How to get the settlement time for xauusd.

 

Hi All,

New to MT5, I need help retrieving the timestamp during which settlement period(The 1 hour period during which trading is closed) starts and end for xauusd. And need to retrieve using MQL5. Any help appreciate. 

Thanks in advance 

 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
vraj0073: New to MT5, I need help retrieving the timestamp during which settlement period(The 1 hour period during which trading is closed) starts and end for xauusd. And need to retrieve using MQL5. Any help appreciate. 

Do you perhaps mean the trading session?


SymbolInfoSessionQuote

Allows receiving time of beginning and end of the specified quoting sessions for a specified symbol and day of week.

SymbolInfoSessionTrade

Allows receiving time of beginning and end of the specified trading sessions for a specified symbol and day of week.

Also read the following:

MQL5 Book: Trading automation / Financial instruments and Market Watch / Schedules of trading and quoting sessions
 
vraj0073:

Hi All,

New to MT5, I need help retrieving the timestamp during which settlement period(The 1 hour period during which trading is closed) starts and end for xauusd. And need to retrieve using MQL5. Any help appreciate. 

Thanks in advance 

You're likely trading a CFD with futures-like expirations because XAUUSD is not a real Gold futures symbol nor a currency pair. See Last Trade below (real futures).

This is referenced using SYMBOL_EXPIRATION_TIME.

Symbol Properties - Environment State - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5

specs

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...
 
@Ryan L Johnson #: You're likely trading a CFD with futures-like expirations because XAUUSD is not a real Gold futures symbol nor a currency pair. See Last Trade below (real futures).

I think you misunderstood what the OP wrote ... " settlement period(The 1 hour period during which trading is closed) "
 
Fernando Carreiro #:

Do you perhaps mean the trading session?


SymbolInfoSessionQuote

Allows receiving time of beginning and end of the specified quoting sessions for a specified symbol and day of week.

SymbolInfoSessionTrade

Allows receiving time of beginning and end of the specified trading sessions for a specified symbol and day of week.

Also read the following:

MQL5 Book: Trading automation / Financial instruments and Market Watch / Schedules of trading and quoting sessions
I was using this functions and getting 00:00 as output which I thought is wrong, But looking at the documentation it seems to be working fine. Thanks for help
 
Ryan L Johnson #:

You're likely trading a CFD with futures-like expirations because XAUUSD is not a real Gold futures symbol nor a currency pair. See Last Trade below (real futures).

This is referenced using SYMBOL_EXPIRATION_TIME.

Symbol Properties - Environment State - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5


Thanks for posting but I was looking for closed trading hour time and not expiration time.