Enter your date as an external string, then use StrToTime();
var1=StrToTime("17:35"); // returns the current date with the given time
Thanks Michel. Will try it out
Hi, I would like an EA to trade at a particular time e.g. 16:15
How do I code this?
Am using "extern double nFromHourTrade = 16;" but it will not accept minutes in the value specified. Any help appreciated
Many thanksI checked Gordago software and they have two indicators:
- DayOfWeek; and
- PeriodOfTime.
They are using these two indicators in Trading News strategy.
I converted 2 indicators and EA (working on M15 timeframe only) for MT4.
We may use these indicators in the folowing way:
where 5 is Friday.
We are trading on Friday if:
As to hours and minutes so we may use as:
[CODE]double diCustom1=iCustom(NULL, 0, "PeriodOfTime", 13, 25, 1, 0, 0);where
13 is hours;
25 is 25 minutes;
1 is interval in min; 1 for M1 timeframe.
We are trading at 13:25 if:
[CODE]diCustom1>0Newdigital - Thank you so much. Really appreciate your help!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, I would like an EA to trade at a particular time e.g. 16:15
How do I code this?
Am using "extern double nFromHourTrade = 16;" but it will not accept minutes in the value specified. Any help appreciated
Many thanks