MFI CROSS strategy to test and improve on Wall Street 6 minutes

Forums ProRealTime English forum ProOrder support MFI CROSS strategy to test and improve on Wall Street 6 minutes

  • This topic has 38 replies, 8 voices, and was last updated 6 years ago by avatarDEIO.
Viewing 15 posts - 16 through 30 (of 39 total)
  • #65366

    hi all,

    about the strategy I’m trying to apply Nicolas code (logic MFE).

    I don’t understand why it seems that doesn’t exit at priceexit.

    The code seems to be ok.

    Anyone can test and let me know if I’m wrong and where ?

    Here the code (this code is on TF 5 minutes):

     

    thx

     

    Moderator’s edit: code edited to apply the correct PRT code format, please use “insert PRT code” button for future occurences (last one at end of first line of tools in message editor), thanks

    #65367

    Have you tried GRAPH the Trailing Stop and use the Cursor Details (right click, Display, bottom of list) as attached … it does look like it exited at the TS ??

    I haven’t studied it as I am giving you an idea so you can monitor / look into it further?

    Cheers
    GraHal

    #65456

     

     

    hi GraHal,

    I did al lot of test and I catch a issue that in my opinion is very important to me.

    I ask Nicolas a question but I have no response at the moment.

    I posted the question here:

    https://www.prorealcode.com/blog/learning/trailing-stop-max-favorable-excursion-mfe/

    Let me know your opinion and waiting for the Nicolas one.

     

    thx a lot

    bye

     

    #65460

    Ah yes the MFE Trail will not get you out of Trade like a Trailing Stop … you need a stop loss or a Trailing Stop also.

    The MFE Trail follows / trails the Max Favourable Excursion / MFE so that a Trade that was in profit does not end up a losing Trade having not reached it’s Profit Target (as we all have had happen to us and it’s  maddening! ).

    So yeah you need an MFE Trail and a normal PRT Stop Loss or PRT  Trailing Stop.

    Even Nicolas other Trailing Stop (link below) will not act as a Stop Loss in the first period after Trade opens because it needs at least one full period to become operational (I think?).

    https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/

    Hope that Helps?
    GraHal

    #65462

    Ok clear

    Just I would  suggest to explain this aspect in the link of MFE explanation, especially for the less expert.

    Soon I am going to provide the new code of the strategy on WS 6min, with this fix on  the first stop loss.

    Thx for your cooperation.

    Bye

    #65464

    Yes I agree it is confusing DEIO, it would be better if it is called  Trailing Gain with the Max Favorable Excursion (MFE)

    And better if the term Trailinggain is used in the code instead of Trailingstop?

    I look forward to your latest code
    GraHal

    #65499
    Jan

    Hi GraHal,

    thanks for sharing the strategy,  sounds promising.

    How do you practically deal with the fact that often in optimizing with lots of bars (like 100k bars) the equity shows choppy results at the beginning ? Just ignore or ?

    (in my opinion the loisy results are caused as the optimalisation of parameters is based on getting the best END results.  An optimalisation given 4.000 profit with a loss of 3.000 in the beginning is more favorable for the optimize-machine then a 3.000 profit with 1.000 euro profit in the beginning. However the latter I would like more)

    Kind regards,

    Jan

    #65505

    Hi Jan, it’s not my Strategy, it’s DEIO’s … he’s doing all the work.

    Yes I agree, ignore the early in period poor performance. Often anyway it just looks worse as it shows a below zero equity curve, but there can be just as much drawdown later on but it’s not so obvious as it’s hidden amongst profits above the zero line?

    I usually click on several variable values in the Table of Results and compare equity curves … you can get surprising differences, some more as you describe with less of an early in period drawdown.    

    Cheers
    GraHal

    #65534

    Your full explanation was so good Manel, I raised it on the Platform Support Forum under your Quote … hope you don’t mid?!

    Hey Grahal – Of course not. Thanks for raising it.  Anything to help make this platform better for all users is always appreciated.

    And yes, I am a bit of a perfectionist so cannot sit on stuff if it’s not right however I have learnt that also sometimes you have to work with the limitations you are under and not get unduly frustrated :-). It’s a fine balancing act but being constructive is probably the only way to keep sane !

    1 user thanked author for this post.
    #65556

    hi all,

    I am happy to read your considerations about the strategy on WS.

    My basic intention anyway is to obtain a strategy that keep me out of the market during negative phase (it could seem to be a stupid idea

    but I have seen too strategies  make tons of trade which could be avoided….   🙂

    So with this strategy I  wait until the market is good to go  long… nothing else.

    I don’t like strategies with endless code  etc..)

    Moreover I have inserted in the codea  full managing of the MFE criteria (comprhending the first stop loss too).

    here the code:

    EDIT: post edited – please use the ‘Insert PRT Code’ button when posting code.

    #65562

    Hey results look well good DEIO … good work!!!

    Might you consider a Short version?

    PS You forgot to use the Insert PRT Code button again; Nicolas was enjoying his Sunday up to this point! 🙂 🙂

    #65648

    Might you consider a Short version?

     

    And here is the LONG / SHORT version!

    Good trades!

    Gertrade

    2 users thanked author for this post.
    #65652
    Jan
    Deio,
    with the code below, the CONDAVG is only set to 1 if during the complete fast average period (F) the slow average always increases, to my understanding.
    Why did you add this code ?
    CONDAVG = 1
     AVG = Average[S](close)
    FOR C = 1 TO F
    IF AVG[C1] > AVG[C] THEN
    IF CONDAVG = 1 THEN
    CONDAVG = 1
    ENDIF
    ELSE
    CONDAVG = 0
    ENDIF
    NEXT
    #65658

    Hey thanks Gertrade, I’ve set both DEIO Long only and your Long & Short going Live @ 0.5 Lot size on both … I’ll monitor each trade as it develops and report back.

    The Short trades do give a useful boost to profits on backtest, see attached.

    Cheers
    GraHal

    2 users thanked author for this post.
    #65788

    HI JanWd,

    I set such conditions just because I wanted that tha BASE AVG (the slow one) be always increasing in the last F periods.

    If I used the last S periods the condition would be too restrictive and trades would be very few.

    you can test it substituting in the loop … FOR C= 1 TO F  WITH   FOR C = 1 TO s

    thx

    bye

Viewing 15 posts - 16 through 30 (of 39 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login