# How To Set Alerts

Alerts can be created to trigger on any user set condition, like crosses between two indicators, price entering or exiting a channel...etc. Users can be notified when the condition is triggered via desktop notifications, emails, etc.

### Create An Alert <a href="#create-an-alert" id="create-an-alert"></a>

When adding the indicator to the chart, the default alerts come pre-enabled, which basically just pops up a window and says the action on whatever chart is open.

To add the other types of alerts, you'll need to activate them in the settings menu, and then configure the push notifications / email / sound alerts in the settings menu.

Go to the settings of the indicator **→** Scroll down till you see "Alert Settings". Enable whatever alerts you prefer to use.

<figure><img src="https://3248255196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvlAXcFRe66TbFkbvhRdj%2Fuploads%2FAhSJO0y6sWlBlrz6nrCP%2Ff53ca2ee7d8dec76b78bcc6927c558f2.png?alt=media&#x26;token=2ef5709f-f4b8-4962-b2af-e38b952d33dd" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Please note:** In order for you to receive alerts, your chart must be open.

If you would like to be able to close your chart and still get alerts, you have to set up [Virtual Hosting. ](https://www.metatrader5.com/en/trading-platform/vps)
{% endhint %}

### Email Alerts

#### 1. Navigate to **Tools → Options**.

<figure><img src="https://3248255196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvlAXcFRe66TbFkbvhRdj%2Fuploads%2FJkektkKeRkDuBgXTKmFo%2Fnavigate-to-options-meta-trader.jpg?alt=media&#x26;token=04842c43-ecb3-4bf0-971e-2a1323bf526c" alt=""><figcaption></figcaption></figure>

#### 2. First, check the option “**Enable email notification**“

<figure><img src="https://3248255196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvlAXcFRe66TbFkbvhRdj%2Fuploads%2FhowVSpM0sq6NqbZvRXvq%2Fcheck-the-option-to-enable-email-notifications-mt4-mt5.jpg?alt=media&#x26;token=687d232f-c653-4628-9df7-7dc16434c167" alt=""><figcaption></figcaption></figure>

#### 3. Enter the required details

**SMTP Server:** Enter the SMTP server host (smtp.gmail.com)

**SMTP Login:** Enter the SMTP username (your email address)

**SMTP Password:** Enter SMTP password (your email password)

**From:** Enter the email from which you would like to send the email notifications.

**To:** The name you want the alerts to come from

{% hint style="info" %}
If you are using Gmail you may have to use "456" as the port number. Example: "smtp.gmail.com:456". If you are using something other than Gmail, you will have to look up what port number to use.
{% endhint %}

#### Creating SMTP password:

When setting up your email password, you have to create an "app password" through Gmail so MT5 can login to your Gmail. This a Gmail specific tutorial. If you are using a different email provider, you will have to figure out how to create an "app password" on their platform.

1. Go to your [Google Account](https://myaccount.google.com/).
2. Select **Security**.
3. Under "Signing in to Google," select **App Passwords**. You may need to sign in. If you don’t have this option, it might be because:
   1. 2-Step Verification is not set up for your account.
   2. 2-Step Verification is only set up for security keys.
   3. Your account is through work, school, or other organization.
   4. You turned on Advanced Protection.
4. At the bottom, choose **Select app** and choose the app you using ![and then](https://lh3.googleusercontent.com/3_l97rr0GvhSP2XV5OoCkV2ZDTIisAOczrSdzNCBxhIKWrjXjHucxNwocghoUa39gw=w36-h36) **Select device** and choose the device you’re using ![and then](https://lh3.googleusercontent.com/3_l97rr0GvhSP2XV5OoCkV2ZDTIisAOczrSdzNCBxhIKWrjXjHucxNwocghoUa39gw=w36-h36) **Generate**.
5. Follow the instructions to enter the App Password. The App Password is the 16-character code in the yellow bar on your device.
6. Tap **Done**.

<figure><img src="https://3248255196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvlAXcFRe66TbFkbvhRdj%2Fuploads%2FzDukyVj6FupKZ9cS9O6R%2Fsmtp-details-for-email-alerts-mt4-mt5.jpg?alt=media&#x26;token=be5606f0-2e94-414e-99a9-02cd276b5808" alt=""><figcaption></figcaption></figure>

#### 4. Finally, click on **SAVE**.

{% hint style="success" %}
Once the configured alerts condition becomes true, or an event happens, you will receive the same alert through the configured SMTP server on the “TO” email address.
{% endhint %}

### Mobile Alerts

Mobile notifications also need to be enabled in the *Options*. They also require one additional step.

In *Tools→Options→Notifications*, you need to tick *Enable Push Notifications* and insert your *MetaQuotes ID*.

You will need to download and install MetaTrader app for your phone, either Android or iOS.

Once MetaTrader mobile app is installed, you can retrieve the *MetaQuotes ID* from it as instructed in the *Notifications* tab.

Once configured, you can send a test to check if it works.

<figure><img src="https://3248255196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvlAXcFRe66TbFkbvhRdj%2Fuploads%2FgpEweTsCTt9AJJBYDcfL%2FConfigure-Alerts-Metatrader-MT4-MT5-4.png?alt=media&#x26;token=29e609ab-80f5-4801-ab1e-c5bb61546723" alt=""><figcaption></figcaption></figure>

To start receiving alerts to your phone using MetaTrader follow these instructions;

* Download the MT5 app on your phone.
* Open the app on your mobile and go to the messages header. Look for your eight character ID number.
* Open your MetaTrader charts on your desktop.
* Select “Tools” > “Options and then “Notifications”.
* Enable the checkbox for “Enable push notifications”.
* Enter your eight character ID that you got from your mobile app.
* Hit the test button. This should send a test alert to your phone to make sure it is working.

### Alert Notifications

Alert notifications are enabled by default. However, if you wish to change the sound used for these alerts, you can do so in the *Events* tab.

<figure><img src="https://3248255196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvlAXcFRe66TbFkbvhRdj%2Fuploads%2FMbXcgdnsRRWIqEO1FoJ7%2FConfigure-Alerts-Metatrader-MT4-MT5-2.png?alt=media&#x26;token=d4db7f8a-4854-4f08-9244-59faccbe5ff0" alt=""><figcaption></figcaption></figure>
