Hallo Forum,
is ist possible to get the strategyprofit of the points and not of the money? Something like “strategypoints”?
Or how can I programm this?
For Example how can I program the summation of the last close minus the last open? Or maybe the summation of the last “strategyprofit” divided by the last Ordersize?
I hope someone can help me.
Best regards
superborstig
I think this should do:
strategypoints = strategyprofit / pointvalue
The problem is that you don’t consider the leverage used to get the points profit.
Here is a snippet I found:
minContract = 1
if(strategyprofit<>strategyprofit[1]) then
pnl = strategyprofit-strategyprofit[1]
size = max(minContract,abs(countofposition[1]))
onepos = pnl/size
pointprofit = onepos/pointvalue
strategyprofitpoint = strategyprofitpoint+pointprofit
endif
Robertogozzi and Nicolas, thank you for your prompt answers!
Nicolas had the answer I needed.
Thank you both very mutch!