detect the London opening sission
- how to detect the London session?
- What I understood is Correct?
- Is this possible to detect London Market Open time Automatically?
Dear Mohammad,
nope this won't work.
Please read the documentation: https://docs.mql4.com/dateandtime/hour
Hour() returns the last known server time which means that it returns different values for different brokers.
Check the Date and Time possibilities for MQL4 in detail: https://docs.mql4.com/dateandtime
And if you google for GMT and DST codes for mql4 you'll find a bunch of examples.
Best regards
Daniel
What I do, ...
Read server time ...
Add/sustract GMY difference from the EA input external settings ...
By the way, if you search for 1MinuteDaily indicator, you will find ready code there.
//--- void OnTick() { if ( TimeGMT() == 7 ) .... //London if ( TimeGMT() == 21 ) .... //Tokyo if ( TimeGMT() == 12 ) .... //New York }