Forums ProRealTime English forum ProOrder support Cumulate orders and decimal position size strange backtest results Reply To: Cumulate orders and decimal position size strange backtest results

#60868

Hello Verdi,

About your codes (in the message you posted on 01/05/2018 at 4:50pm), our technical team informed us that the difference in the results is normal, since one can take decimal quantities with IG, both in ProBackTest and in real trading.

In your first code, there will always be a rounded value, while in the second there can be a decimal value.

Let’s take, for example, a loss of -900. In your first code:

number = 1 + ((strategyprofit + 10000) / 125)=1+((-900+10000)/125)=73.8

n = round(number)=round(73.8)=74

In your second:

number = 1 + ((strategyprofit + 10000) / 125)=1+((-900+10000)/125)=73.8

n = round(number * 100) / 100=round(73.8*100)/100=round(7380)/100=7380/100=73.8

Best wishes,

Ilaria

ProRealTime