Test for lost trades

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #7857 quote
    davidp13
    Participant
    Average

    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

    #7867 quote
    Nicolas
    Keymaster
    Master

    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 🙂

    #7868 quote
    Nicolas
    Keymaster
    Master

    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.

    maximum-favorable-execution-MFE.jpg maximum-favorable-execution-MFE.jpg
    #7908 quote
    davidp13
    Participant
    Average

    Brilliant thanks.

    Now how can one use this information effectively? Any idea?

    #7909 quote
    Nicolas
    Keymaster
    Master

    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 🙂

    #7940 quote
    davidp13
    Participant
    Average

    Question is how do one define the highest level? there might be more higher levels coming? like with the GRID strategy…

    #7951 quote
    Nicolas
    Keymaster
    Master

    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.

    #7999 quote
    davidp13
    Participant
    Average

    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
    #8002 quote
    Nicolas
    Keymaster
    Master

    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
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.

Test for lost trades


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
davidp13 @davidp13 Participant
Summary

This topic contains 8 replies,
has 2 voices, and was last updated by Nicolas
9 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/24/2016
Status: Active
Attachments: No files
Logo Logo
Loading...