MT5 Tester Issue - Lotsizing not working on tester

 
   double tickSize      = SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_SIZE);
   double tickValue     = SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE);
   double valueToRisk   = risk / 100 * capital;
   double tickCount     = sldistance / tickSize;
   double lots          = valueToRisk / (tickCount * tickValue);

For any risk percent, JPY pairs resulting 0.01,since i used min lot as if calculation exceeds below 0.01.

But It's working properly in realtime trading.


 
Philip Pankaj :

For any risk percent, JPY pairs resulting 0.01,since i used min lot as if calculation exceeds below 0.01.

But It's working properly in realtime trading.


Have you unchecked the checkbox in the strategy tester?


 
Vladimir Karputov:

Have you unchecked the checkbox in the strategy tester?


Thanks mate.

It works :)