[B135] MQL5 Code - PointValue - Serious Error - Backtesting not 100% real

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

Attachments
Screenshot_20.png
(51.05 KiB)
  • Votes +3
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

m
#1

Mariano

05.10.2021 19:58

Task created

m
#2

Mariano

05.10.2021 19:58
Voted for this task.
h
#3

hankeys

07.10.2021 07:42

maybe the same problem for MQL4


https://roadmap.strategyquant.com/tasks/sq4_8347
E
#4

Emmanuel

08.10.2021 12:01
Voted for this task.
E
#5

Emmanuel

29.01.2022 14:54
Voted for this task.
TT
#6

Tamas

09.09.2022 08:52

Status changed from New to Refused


Votes: +3

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please