Hi everyone,
Could anyone help me refine the code that will return the Drawdown and Run up value ?
I think Drawdown will be something like this (1min TF over a 1 week lookback):
floatingprofit = (((close-positionprice)*pointvalue)*countofposition)/pipsize + strategyprofit
Drawdown = highest[60*24*7](floatingprofit) - lowest[60*24*7](floatingprofit)
E.g. I want to refer or closely calculate these values:
[attachment file=9451]
Hi grizzly, drawdown of closed trades or drawdown of the floating ones? There are 2 different things 🙂
I assume you want to calculate the floating one since you are using the “floatingprofit” variable already discussed here and there on the site, so be aware that the “max drawdown” of the ProBacktest result window has nothing to deal with it.
Hi Nicholas,
I would like the drawdown value of the floating-profit as I’m having trouble with the Max(floating profit) part of the code.
Thank you
E.g. Calculate the drawdown in this
[attachment file=9458]
So you are looking for the MAE, the Max Adverse Execution, it is the minimum profit that the trade has reached, you should look at my recent blog article about the MFE, it is the exact inverted calculation.
Thanks Nicholas – I will take a look
But use the floating profit and not the candlestick close price of course 🙂
😉
MAXPRICE = MAX(MAXPRICE,((((close-positionprice)*pointvalue)*countofposition)/pipsize + strategyprofit))
graph maxprice coloured (200,0,0) as "c1"
[attachment file=”9485″]
Perfect for high-watermarks 🙂
[attachment file=9490]
Well done! and seems a nice decent strategy 😉