Alan Lee:
Hi All,
I'm looking for a bit of code which I could put into my EA which would stop trading if there's a certain date and start again. I would have a remote text file with these dates.
Does anyone have anything which i could use?
The simplest would be to check current date :
string day = TimeToString(TimeCurrent(),TIME_DATE);
and compare it with a string in the same format extracted from the text file
if (day == datefromtextfile) { EnableTrading = false; }

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
Hi All,
I'm looking for a bit of code which I could put into my EA which would stop trading if there's a certain date and start again. I would have a remote text file with these dates.
Does anyone have anything which i could use?