At first I thought it was only possible in MQL5, but after checking MQL4 documentation, it seems it is also possible in MQL4+.
Use SymbolInfoSessionTrade ...
Allows receiving time of beginning and end of the specified quoting sessions for a specified symbol and day of week.
Allows receiving time of beginning and end of the specified trading sessions for a specified symbol and day of week.

- docs.mql4.com
At first I thought it was only possible in MQL5, but after checking MQL4 documentation, it seems it is also possible in MQL4+.
Use SymbolInfoSessionTrade ...
Allows receiving time of beginning and end of the specified quoting sessions for a specified symbol and day of week.
Allows receiving time of beginning and end of the specified trading sessions for a specified symbol and day of week.
Thanks a lot!
Could you make an example on how to recall the trading session closing time with SymbolInfoSessionTrade ?
I wouldn't expect a bool variable to recall time details.
Thank you!

- docs.mql4.com
datetime from,to; uint session=0; while(SymbolInfoSessionQuote(_Symbol,FRIDAY,session,from,to)) { printf("Quoting session %i start %02i:%02i to %02i:%02i",session,from/3600,(from%3600)/60,to/3600,(to%3600)/60); session++; } session=0; while(SymbolInfoSessionTrade(_Symbol,FRIDAY,session,from,to)) { printf("Trading session %i start %02i:%02i to %02i:%02i",session,from/3600,(from%3600)/60,to/3600,(to%3600)/60); session++; }That's for FRIDAY, adjust accordingly.
Can I write a statement like this?
I can't verify because markets are closed.
datetime m=TimeMinute(TimeCurrent())-15; if(SymbolInfoSessionTrade(_Symbol,FRIDAY,session,from,m)) { Print("15 minutes before closing of Friday trading session"); }
Thank you
Could you make an example on how to extract the value of "to" parameter, so I can compare it with actual time?
Thanki you!

- 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 all, is there a way to recall the stop trading time indicated in every contract specification?
In the below example 19:30. Thank you