"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?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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?