PaulParticipant
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.
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
PaulParticipant
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?
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
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
Attached shows the differences (green being None’s proposed version).
PaulParticipant
Master
Thnx GraHal, that made it easy, had to blink twice first 🙂 Nonetheless y’re right. Thnx for pointing it out.
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.
PaulParticipant
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.
Applied a simple filter for trend
see line 74-76
can only test on 100 k bars though
PaulParticipant
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
looks decent i like it more with the filter i used.
and it gave similar results prior to the dates i tested it at
PaulParticipant
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.
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