How do I convert this to mql5
-
I'm trying to get the massive tutorial template to work in mql5. It seems this bit of code is not compatible with mql5
vdSwapSell=NormalizeDouble(MarketInfo(Symbol(),MODE_SWAPSHORT),3);
vdSwapBuy=NormalizeDouble(MarketInfo(Symbol(),MODE_SWAPLONG),3);I get these errors. I suspect they are expressed differently in MT5
')' - open parenthesis expected
'MarketInfo' - undeclared identifier
'MODE_SWAPSHORT' - undeclared identifier
'MODE_SWAPSHORT' - some operator expected
'Symbol' - some operator expected
'3' - unexpected token
'MarketInfo' - undeclared identifier
'MODE_SWAPLONG' - undeclared identifier
'MODE_SWAPLONG' - some operator expected
'Symbol' - some operator expected
'3' - unexpected token -
@jzfusion try using these lines of code:
vdSwapSell=NormalizeDouble(SymbolInfoDouble(Symbol(), SYMBOL_SWAP_SHORT),3);
vdSwapBuy=NormalizeDouble(SymbolInfoDouble(Symbol(), SYMBOL_SWAP_LONG),3);https://www.mql5.com/en/docs/marketinformation/symbolinfodouble
https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#enum_symbol_info_double