How to know to be in trading hours of symbol

 

Hello community,

when  open symbol information from market view, i can see trading hours for symbol.

But i do not find a corresponding function to fetch this information.

How do i know, if am currently in trading hours for symbol ?


Thank you

 
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
To obtain the current market information there are several functions: SymbolInfoInteger(), SymbolInfoDouble() and SymbolInfoString(). The first parameter is the symbol name, the values of the second function parameter can be one of the identifiers of ENUM_SYMBOL_INFO_INTEGER, ENUM_SYMBOL_INFO_DOUBLE and ENUM_SYMBOL_INFO_STRING. Some symbols...
 

Thanks for answer. I only see a start time for futures. No info about trading hours.

Something like this:


(mo: 07:00-21:00

...

 fri: 07:00-21:00)

Also found no id for SymbolInfoDouble or SymbolInfoString.

So the link is not what i am looking for

 
 
lippmaje:
See SymbolInfoSessionTrade

Great! Thank you. last question: Are the times according:


TimeLocal

or

TimeTraderServer

or

TimeCurrent

There is no information about in the SymbolInfoSessionTrade help section.

 
The function returns the same values as can be seen in the symbol specification.
 
And it's best to use servertime (TimeCurrent())
 
Marco vd Heijden:
And it's best to use servertime (TimeCurrent())

TimeCurrent

Thank you