- help needed
- [WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you.
- how I can create a routine for my EA starts in a time scale
Please edit your post and
use the code button (Alt+S) when pasting code
I strongly advise you to never use StrToTime or StringToTime without an actual date in the string. This is because it will return the computer's local date, not necessarily the same as the platform date, which may not work with the code.
StrToTime(EndTime)+5
Why do you add the 5?
You may find it easier to have a start hour and start minute and then check Hour() and Minute() against these.
Never mix ands and ors with out parentheses. which do you mean?
(StartTime<now && EndTime+5>now )||(StartTime1<now && EndTime1+5>now) StartTime<now && (EndTime+5>now || StartTime1<now) && EndTime1+5>now
Never mix ands and ors with out parentheses. which do you mean?
Please edit your post and
use the code button (Alt+S) when pasting code
I strongly advise you to never use StrToTime or StringToTime without an actual date in the string. This is because it will return the computer's local date, not necessarily the same as the platform date, which may not work with the code.
Why do you add the 5?
You may find it easier to have a start hour and start minute and then check Hour() and Minute() against these.
I still can not get it right
Never mix ands and ors with out parentheses. which do you mean?
Which is the correct way ?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use