alerts repeated on chart refreshes
"I though of using globalvariables but can you store datetimes in global variables?"
GlobalVariables are doubles, datetime an int.
So, yes.
An nteresting side effect of this is that if the variable is set in the 1hr chart using
FourHourLastAlertTime = Time[0]; it will sound every time a lower timeframe chart is selected but if you select a higher timeframe chart, it will not. Any ideas why?
I am having problems with alerts being repeated every time I change the chart period or reload metatrader.
I though of using globalvariables but can you store datetimes in global variables?