Strategy MAEX – experiment with MFE & MAE

Viewing 15 posts - 1 through 15 (of 83 total)
  • Author
    Posts
  • #148568 quote
    Paul
    Participant
    Master

    This strategy Maex (Maximum Excursion) tries to find a good opportunity to buy the lows.

    So I experimented with MFE & MAE. I ‘ve some doubt if it’s programmed right, but it gives interesting results.

    The algo is based on the dow 1 minute, no position overnight and a stoploss of 0.5%.

    As basis, I wanted to minimise the optimisation of parameters sl/pt/ts/be and all are based in a rough ratio on the stoploss (except the atr trailingstop).

    The goal is to improve on this preferably without changing the ratio’s but through new methods which could replace the current one or add to it.

    swedshare, Nicolas, boonet and 5 others thanked this post
    Screenshot-2020-10-26-at-18.46.32.jpg Screenshot-2020-10-26-at-18.46.32.jpg DJ-1m-Maex-v1-long.itf
    #148660 quote
    Roger
    Participant
    Veteran

    Intersting! Maybe im wrong but i would write it :

     

    maerec=0
    mferec=0
    maerec2=0
    mferec2=0
    
    for i=1 to n
    maerec=maerec+(high[i]-open[i])
    mferec=mferec+(open[i]-low[i])
    next
    
    for j=1 to nn
    maerec2=maerec2+(open[j]-low[j])
    mferec2=mferec2+(high[j]-open[j])
    next
    
    averecentmael=close-(maerec2/nn)
    averecentmfel=close+(mferec2/nn)
    avgl=(averecentmael+averecentmfel)/2
    
    averecentmaes=close+(maerec/n)
    averecentmfes=close-(mferec/n)
    avgs=(averecentmaes+averecentmfes)/2
    
    avgmfemaes=average[25](avgs)/2
    avgmfemael=average[25](avgl)/2
    #148664 quote
    Paul
    Participant
    Master

    Yes your right and that’s the part I had doubts about! I did write it like above but then there too many signals and the strategy breaks. But looking where the signals come, it’s in general very good but needs more work.

    I prefer it the way you wrote it, but how to make it better and outperform the way I wrote it?

    #148705 quote
    Roger
    Participant
    Veteran

    I have tried to optimize my version but all results are very bad… I dont know why but your version performs far better than mine

    #150293 quote
    nonetheless
    Participant
    Master

    Hi, just looking at this part of your breakeven code

    if besensitivity=1 then
    besensitivity=close
    besensitivity=close
    elsif besensitivity=2 then
    besensitivity=high
    besensitivity=low
    elsif besensitivity=3 then
    besensitivity=low
    besensitivity=high
    endif
    if longonmarket then
    if besensitivity-positionprice>=((positionprice/100)*besg)*pointsize then
    benewsl=positionprice+((positionprice/100)*besl)*pointsize
    endif
    endif
    if shortonmarket then
    if positionprice-besensitivity>=((positionprice/100)*besg)*pointsize then
    benewsl=positionprice-((positionprice/100)*besl)*pointsize
    endif
    endif

    shouldn’t it be ?

    if besensitivity=1 then
    besensitivitylong=close
    besensitivityshort=close
    elsif besensitivity=2 then
    besensitivitylong=high
    besensitivityshort=low
    elsif besensitivity=3 then
    besensitivitylong=low
    besensitivityshort=high
    endif
    if longonmarket then
    if besensitivitylong-positionprice>=((positionprice/100)*besg)*pointsize then
    benewsl=positionprice+((positionprice/100)*besl)*pointsize
    endif
    endif
    if shortonmarket then
    if positionprice-besensitivityshort>=((positionprice/100)*besg)*pointsize then
    benewsl=positionprice-((positionprice/100)*besl)*pointsize
    endif
    endif
    #150302 quote
    GraHal
    Participant
    Master

    Attached shows the differences (green being None’s proposed version).

    None.jpg None.jpg
    #150304 quote
    Paul
    Participant
    Master

    Thnx GraHal, that made it easy, had to blink twice first 🙂 Nonetheless y’re right. Thnx for pointing it out.

    #150358 quote
    nonetheless
    Participant
    Master

    Your sensitivity options are such a great innovation for TS if you get it right.

    2 seems to work best for scalping algos where you want to lock it up as quick as poss. 3 (or typicalprice) works better if you’re playing a longer game.

    I want to have another look at this MAEX algo – could have potential. I know you wanted to keep everything related to the sl but I’m not entirely convinced. Freeing that up made an immediate improvement, but I’m sure you looked at that already.

    Also think it could be suited to a longer TF – will try that over the weekend.

    Kovit thanked this post
    #150464 quote
    ullle73
    Participant
    Senior

    interesting, following 🙂

    #150475 quote
    Paul
    Participant
    Master

    Looking foward to your tests nonetheless. I can’t find good ways to improve on this. Maybe define a bigger trend with hull average, i.e. weekly, and use that to buy in the trend the lows? It maybe works for selling the highs too. I will give it a try later.

    #150498 quote
    snucke
    Participant
    Veteran

    Applied a simple filter for trend

     

    see line 74-76

     

    can only test on 100 k bars though

    a.png a.png b-1.png b-1.png DJ-1m-Maex-v2-long.itf
    #150521 quote
    Paul
    Participant
    Master

    Thnx snucke

    here are both 200k 1m.

    I also have struggled to get good OOS results with WF

    Included a WF test of 50k bars

    Screenshot-2020-11-14-at-21.33.09.jpg Screenshot-2020-11-14-at-21.33.09.jpg Screenshot-2020-11-14-at-21.37.18.jpg Screenshot-2020-11-14-at-21.37.18.jpg
    #150525 quote
    snucke
    Participant
    Veteran

    looks decent i like it more with the filter i used.

    and it gave similar results prior to the dates i tested it at

    #150531 quote
    Paul
    Participant
    Master

    Yeah the equitycurve is indeed better. I included it in the new version but removed vectorial for now, focussed on the 2 methods and added short.

    For testing probably it’s best to use reenter=1 as that’s normally used.

    If optimising for long or short, you can exit on opposite signal but not reversing.

    The parameters aren’t optimised for any timeframe so it looks bad.

    GraHal and nonetheless thanked this post
    DJ-3m-Maex-v3.itf
    #150585 quote
    nonetheless
    Participant
    Master

    Here’s a version of the 1m long. My additions are optimized at 70/30

    I also tried to rework your v3 on a 5m TF, it sort of worked but not so profitable

    GraHal, josef1604, swedshare, Paul and Midlanddave thanked this post
    DJ-1m-Maex-v2-long.jpg DJ-1m-Maex-v2-long.jpg DJ-1m-Maex-v2-long-WF.jpg DJ-1m-Maex-v2-long-WF.jpg DJ-1m-Maex-v2-long-1.itf
Viewing 15 posts - 1 through 15 (of 83 total)
  • You must be logged in to reply to this topic.

Strategy MAEX – experiment with MFE & MAE


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Paul @micky75d Participant
Summary

This topic contains 82 replies,
has 14 voices, and was last updated by Meta Signals Pro
2 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/26/2020
Status: Active
Attachments: 37 files
Logo Logo
Loading...