How can Separate Type of Currency in Mql4 code

 

hi

How can Separate Type of Currency in Mql4 code.

for example

i want to separate CFD from Forex or CFD from Future ?>

what command or function in mql4give us information about Type of symbol.

thank you 

 

Use MarketInfo() with MODE_PROFITCALCMODE and MODE_MARGINCALCMODE. Check the link, there is an example.

In my experience, brokers sometimes return "unexpected" values, so be sure to check what your broker returns for the available symbols.

Symbol Properties - Environment State - Constants, Enumerations and Structures - MQL4 Reference
Symbol Properties - Environment State - Constants, Enumerations and Structures - MQL4 Reference
  • docs.mql4.com
A zero value of MODE_STOPLEVEL means either absence of any restrictions on the minimal distance for Stop Loss/Take Profit or the fact that a trade server utilizes some external mechanisms for dynamic level control, which cannot be translated in the client terminal. In the second case, GetLastError() can return error 130, because MODE_STOPLEVEL...