Matthieu Jean Baptiste Wambergue:
Hello,
What is the MQL5 equivalent for MarketInfo(_Symbol, MODE_PROFITCALCMODE) please?
My goal is to have the type of the symbol (forex, CFD...). I tried the SymbolInfoString(_Symbol,SYMBOL_PATH,path) command, but it doesn't work well with all brokers.
Regards,
Matthieu
Should be:
switch((int)::SymbolInfoInteger(symbol, SYMBOL_TRADE_CALC_MODE)) { case SYMBOL_CALC_MODE_FOREX: return(0.0); case SYMBOL_CALC_MODE_CFD: return(1.0); case SYMBOL_CALC_MODE_FUTURES: return(2.0); default: return(-1.0); }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
What is the MQL5 equivalent for MarketInfo(_Symbol, MODE_PROFITCALCMODE) please?
My goal is to have the type of the symbol (forex, CFD...). I tried the SymbolInfoString(_Symbol,SYMBOL_PATH,path) command, but it doesn't work well with all brokers.
Regards,
Matthieu