How to know to be in trading hours of symbol

To add comments, please log in or register
chinaski
984
chinaski  

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

Marco vd Heijden
Moderator
12383
Marco vd Heijden  
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...
chinaski
984
chinaski  

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
806
lippmaje  
chinaski
984
chinaski  
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.

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

TimeCurrent

Thank you

To add comments, please log in or register