Skip to content

Email Notifications


Indicator and Robot algorithms can be written to send you notification emails based on the actions taken.

For example, you can set up a cBot to send you an email every time a position is opened and a Take Profit or Stop Loss is hit.

For the Indicators, you may wish to receive an email notification whenever an indicator reaches a certain level.


Before emails can be sent using an algorithm, you need to apply the correct email settings for your email address.

To apply email settings:

1. Click the Settings icon Settings icon to the lower left and select Email from the Advanced section.

Image title

2. Check Enable Email box to enable email settings.

3. If your email provider requires an encrypted connection (most do) check Use SSL. You can find your SSL settings by doing a simple Google search. Some popular email provider settings are listed below:

  • Gmail (select I want to enable IMAP, then select Other, then use the Outgoing Mail settings)

  • Hotmail / MSN / Live (find SMTP server)

  • Yahoo (use Outgoing Mail settings)

  • AOL (use Outgoing Mail settings)

4. Enter your username and password. Your username is usually your full email address, but check your provider's help pages if you're not sure.

5. When done click Apply.

Image title

If you're using custom indicators in cTrader, then make sure to set up your email notification settings there as well, in exactly the same way as described above.

Algorithm code for email notifications

Even if you're not a developer, changing an algorithm's code to send email notifications is relatively simple.

To enable email notifications based on any event, do the following:

  1. Select a cBot or an Indicator from the list.
  2. In the source editor find the action you want to receive emails for.
  3. For example, if you want the algorithm to send an email every time a position is opened, find the OnPositionOpened method.
  4. In the braces {}, type Notifications.SendEmail("", "", "Email Subject", "Email body");
  5. Click the Build button to apply the changes. If you haven't made any errors, the red asterisk on the build icon will disappear, and you'll see a Build succeeded message and the algorithm should now send you email notifications when run.

Last update: July 1, 2022