Addind Alerts

ogwedhi

Trader
Apr 8, 2021
12
1
6
39
Hi,
I'm trying to add alerts to a line indicator. When it turns white it should read possible trend change, blue for buy and gold for sell. Its kinder working but is giving alerts every so often. How can i reduce the number of alerts, not every candle stick but like every 2 to five ins or so.

How can I achieve this effectively?

Regards,
Flavia
 

Attachments

Enivid

Administrator
Staff member
Nov 30, 2008
15,982
798
144
Odessa
www.earnforex.com
valc[] is a color buffer for the indicator's line. If you want alerts on the color change than you have to checking that the current valc value is different from the previous one instead of checking the atr[] buffer, which you don't need at all.
 

ogwedhi

Trader
Apr 8, 2021
12
1
6
39
Thanks for the response. I have done some changes but I'm still not getting the desired result. This one is a challenge to me. Its also still giving an alert very often.
 

Attachments