I have taken a freely available HMA that shows up and down trend in different colours and added pop up and e-mail alerts. There is a two-fold problem here:
(1.) The e-mail alert is issued I think with every single tick, resulting in countless e-mails being issued. I would like it to be issued only once per new condition, i.e. when Uptrend becomes Downtrend and vica versa and then not again until direction is reversed.
(2.) The pop up alert occurs on every new bar and there is something wrong here - it will alert the wrong direction for a few bars and then alert the correct direction after 5 or 6 bars? I would like it to also alert only once on the new bar when Uptrend becomes Downtrend and vica versa, and then not again until direction is reversed.
I attach the file
If anyone can help then it is much appreciated in advance - forum members are obviously welcome to help themselves to the (hopefully) corrected version when the problem is solved.
Thatchman
(1.) The e-mail alert is issued I think with every single tick, resulting in countless e-mails being issued. I would like it to be issued only once per new condition, i.e. when Uptrend becomes Downtrend and vica versa and then not again until direction is reversed.
(2.) The pop up alert occurs on every new bar and there is something wrong here - it will alert the wrong direction for a few bars and then alert the correct direction after 5 or 6 bars? I would like it to also alert only once on the new bar when Uptrend becomes Downtrend and vica versa, and then not again until direction is reversed.
I attach the file
If anyone can help then it is much appreciated in advance - forum members are obviously welcome to help themselves to the (hopefully) corrected version when the problem is solved.
Thatchman
Attached File(s)
HMA alert.mq4
5 KB
|
2,437 downloads
Understanding is a three-edged sword