Hi. Is there a method where one can fine the trades that actual were in profit, but then the market turned around and against the trades direction to only end up in a loss? I know the report shows run up, but I would like to manually inspect these.
Thanks
Hi. What you are talking about is the MFE (Maximum Favorable Excursion) = what was the maximum profit that the trade had before the trade closed.
I think that it can coded easily, let me think about it 🙂
Done.
Please find below the code to add to your strategy.
//Maximum Favorable Execution (MFE)
floatingprofit = (((close-positionprice)*pointvalue)*countofposition)/pipsize
MFE = MAX(MFE,floatingprofit)
GRAPH MFE as "MFE"
if not onmarket then
MFE = 0
endif
Please keep in mind that the GRAPH instruction has to be removed for ProOrder to work. It can only draw the MFE in ProBacktest.
Brilliant thanks.
Now how can one use this information effectively? Any idea?
Maybe exit at x% percent below the higher level of the MFE? to not let too much money on the table.. You can play with lot of things with the variable MFE 🙂
Question is how do one define the highest level? there might be more higher levels coming? like with the GRID strategy…
Defining what would be the future would be a great improvement in my trading, and in yours too I believe 🙂
That’s a very good question! It depends on your strategy… Or maybe don’t let more than 50% retracement of the highest MFE occurs? <- good idea.
i have tried this, but it seems to make no difference.
floatingprofit = (((close-positionprice)*pointvalue)*countofposition)/pipsize
MFE = MAX(MFE,floatingprofit)
IF MFE=MFE[1]*0.8 THEN
SELL AT MARKET
ENDIF
Better test if the actual MFE is inferior of the previous one, not if it has the exact same value (which is almost quiet impossible).
floatingprofit = (((close-positionprice)*pointvalue)*countofposition)/pipsize
MFE = MAX(MFE,floatingprofit)
IF MFE<MFE[1]*0.8 THEN
SELL AT MARKET
ENDIF