Attachments forums

List of attachments posted on this forum.


All files on forums: 134126

Re: How to add alerts to your indicators

bilbao, Fri Jan 31, 2020 6:56 am

Find the last line starting with extern (older MT4 indicators) or input (MT5 and newer MT4 indicators) statement.

Insert the following code after that line:

input int TriggerCandle = 1;
input bool EnableNativeAlerts = true;
input bool EnableSoundAlerts = true;
input bool EnableEmailAlerts = true;
input bool EnablePushAlerts = true;
input string AlertEmailSubject = "";
input string AlertText = "";
input string SoundFileName = "alert.wav";

datetime LastAlertTime = D'01.01.1970';
int LastAlertDirection = 0;


This code uses empty initial alert text and email subject. They will be filled during alert evaluation.
All files in topic