We're all familiar with the option to start or stop our EA's based on a time frame.
ie:
Code:
extern string StartTradeTime = "07:00";
extern string StopTradeTime = "22:00";
I've read several items in TSD and ForexFisherman relating to open/close files and calling dll's for read and writing to txt and csv's
I've also seen a link that shows how to read from a file and display indicators that show text along lines:
http://articles.mql4.com/143
1st question:
How could I modify to have "closing" lines for those indicator lines, such as
a shaded section of time that marks from the "start" to x amount of time after that point (variable 30,60,90 minutes)
What I'm really looking for is a way to read a line from a file like the lines below:
Code:
date;newStopTime;newStartTime;ReasonCode;CountryOfOrigin
15.05.2006;8:55;9:30; Industrial Production M.M ;Japan;
15.05.2006;16:30;16:45; New York Fed Survey ;USA;
15.05.2006;17:00;17:15; Netto Capital Flow ;USA;
16.05.2006;12:30;12:45; HICP Y.Y ;U.K.;
16.05.2006;13:00;13:15; ZEW Economic Sentiment;Germany;
16.05.2006;16:00;16:15; Wal-Mart Stores Report;USA;
16.05.2006;16:30;16:45; PPI M.M ;USA;
And in reading these lines, updating the :
extern string StartTradeTime = "07:00";
extern string StopTradeTime = "22:00";
or possibly just temporarily stopping the automated trading of the EA during the read times.
I understand I have some time zone issues to address, but can always edit the data file with the necessary timezone data as well. I just want to read the file in such a way that it can be aware of when to stop trading while allowing autotrade to be temporaily turned off, then back on unattended.
Any suggestions?