Disliked{quote} Try this brother int CalculateSymbolLeverage(const string symbol) { int leverage = -1; double margin = 0.0; double lots = 1.0; if(OrderCalcMargin(ORDER_TYPE_BUY, symbol, lots, SymbolInfoDouble(symbol, SYMBOL_ASK), margin) && margin > 0) { double tickValue = SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_VALUE); double tickSize = SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_SIZE); double lotValue = tickValue * SymbolInfoDouble(symbol, SYMBOL_ASK) / tickSize; leverage = (int)MathRound(lotValue / margin); } return leverage; }Ignored
"'
"'CalculateSymbolLeverage' - wrong parameters count "
at my comment line:
Inserted Code
CommentString+="\n"+"Symbol Leverage : "+IntegerToString(CalculateSymbolLeverage());