Reviewing the generated code for MQL5, I see that the position size calculation does not match. In SQX it is different from MQL5.
This is because the code that is generated uses the SYMBOL_TRADE_TICK_VALUE. This value is FIXED when using the simulator on MT5. It does not vary depending on the historical price of the pair, so the simulation is not 100% REAL.
PointValue = SymbolInfoDouble(correctedSymbol, SYMBOL_TRADE_TICK_VALUE) / SymbolInfoDouble(correctedSymbol, SYMBOL_TRADE_TICK_SIZE);
I think it should be calculated at every instant of time. This is how the position sizes calculated in SQX coincide and the backtesting is more realistic.
Attached screenshot
Thanks
Mariano