How to know a symbol is a currency pair

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

and no CFD or future, etc. ?

In mql4 and mql5.

Anyone has an idea ?

Thank you

Marco vd Heijden
Moderator
11539
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
970
chinaski  

Hello,

thank you for this link. I already checked all the SymbolInfoX, but there seems not to be some definite attribute.

However, 

SymbolInfoDouble(_Symbol,SYMBOL_TRADE_CONTRACT_SIZE)

works for me to identify forex on MT4,MT5. It returns 100.000.

Mladen Rakic
138756
Mladen Rakic  
chinaski:

Hello,

thank you for this link. I already checked all the SymbolInfoX, but there seems not to be some definite attribute.

However, 

works for me to identify forex on MT4,MT5. It returns 100.000.

https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#enum_symbol_calc_mode

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...
To add comments, please log in or register