Tick Value problem with Calculation of Profit

 

Hello,


I have a problem which is quite simple but drives me crazy :

i'm trying to calculate Profits shown in my Backtest (USD) with the amounts of pips and the lot , here's the formula

pips * lots * (MarketInfo(pair, MODE_TICKVALUE)/ MarketInfo(pair, MODE_TICKSIZE))

the values are : 0.0030 points

0.5 lots

77697.059 as ratio

result = 116.54


And the backtest return 108.35 !!


So i searched and i found this : Open price is 1.38134 Close price 1.38434, considering the close price the tickvalue for a lot is (1/1.38434)*100 000 = 72 236.58

with the above formula : 0.003* 0.5 * 72 236.58 = 108.354 !


my conclusion now would be that Tick value which returns 0.777 is wrong and the real one is 0.722


Am i correct ? and if so how can i fix this, i need to calculate upcoming profit only with pips ...


Thanks

 
victor21:

Hello,


I have a problem which is quite simple but drives me crazy :

i'm trying to calculate Profits shown in my Backtest (USD) with the amounts of pips and the lot , here's the formula

the values are : 0.0030 points

0.5 lots

77697.059 as ratio

result = 116.54


And the backtest return 108.35 !!


So i searched and i found this : Open price is 1.38134 Close price 1.38434, considering the close price the tickvalue for a lot is (1/1.38434)*100 000 = 72 236.58

with the above formula : 0.003* 0.5 * 72 236.58 = 108.354 !


my conclusion now would be that Tick value which returns 0.777 is wrong and the real one is 0.722


Am i correct ? and if so how can i fix this, i need to calculate upcoming profit only with pips ...


Thanks

i have my answer if anyone interested :


https://www.mql5.com/en/forum/157615


in backtest the tickvalue used is fixed , the current one is used, like the spread, thats why the calculation fails ...

Backtest calculates with varied TickValue at cross currency pairs?
Backtest calculates with varied TickValue at cross currency pairs?
  • 2015.11.29
  • www.mql5.com
Hi Coders, I'm running many optimizations. I just realized that there are differents in the resutls at the same EA with same backtest options...
Reason: