PaulParticipant
Master
Here’s a lite strategy using the Hull Moving Average & the Angle based on the Hull.
In total 2 variables and of-course a stoploss & profittarget.
Not intended to find something perfect on 200k bars but test a few bars less, on any timeframe.
it’s pretty good for such small code
defparam cumulateorders = false
// strategy
Period= a1
inner = 2*weightedaverage[round( Period/2)](typicalprice)-weightedaverage[Period](typicalprice)
hull = weightedaverage[round(sqrt(Period))](inner)
cb1 = hull > hull[1] and hull[1] < hull[2]
cs1 = hull < hull[1] and hull[1] > hull[2]
periodea = a2
mma = average[periodea](hull)
adjasuroppo = (mma-mma[1])*pipsize
angle = (atan(adjasuroppo))
cb2 = angle > angle[1] and angle[1] < angle[2]
cs2 = angle < angle[1] and angle[1] > angle[2]
// conditions
condbuy = cb1 and cb2
condsell = cs1 and cs2
// entry
if condbuy then
buy 1 contract at market
endif
if condsell then
sellshort 1 contract at market
endif
//
set stop %loss a3
set target %profit a3
Thanks @Paul
I did a trial on EUr/USD 1 mn as often 100 k
Results are not bad but need some improvments
Whats is not good:
Too much time in the market 98.41 % (Need <20 %)
Bad Sharpe ratio : 0.4 (Need > 1.5)
Bad Standard deviation : 1978.74 (need < average gain )
Too much variations in day/gain
But I think that with some change it could be good
Hava a nice day Paul
looks interesting. ran some quick tests at 5m and 15m and yes, even in this stripped down form it can turn a profit. should be useful in conjunction with other indicators, TFs etc
thanks for that!
PaulParticipant
Master
Hi zilliq I think this code is exactly as short as you like to see it! However you did mention in previous topics that you add money-management & market structure (=parameters?). Indeed the time in market is too long and also the other things you mentioned. But you say that with some change it could be good, so now i’am curious what kind of change you are thinking off. But still nice to see positive results on eurusd!
Hi Nonetheless If you make progress using this concept in any way, i’am always interested! I will also try to expand it.
Hi @Paul it’s short and 3 variables : Perfect 😉
The money management can be enough with stop loss
I think it’s possible to work on the Signal part and there is no code for the Market structure (Range/Trend) to filter the Signals
Have a nice day Paul
This is very interesting. I have tried the same concept but my code looks different. I will take a look and post if useful.
@Zilliq – what would you suggest to use for market structure? I’m curious as I have been following you on the Donkey Posts.
Hi @eckaw
In fact you can use what you want to determine the market structure (ATR, ADX, MACD and so on…) who can determine when you are in Trend, and when your are in Range
Always a small code (The more complex is your code, the more curefit you will do, the worst OOS results you will have), never more than 3-4 parameters (Same reaosns) and so on…Always the same advices
And you should watch some results as on the picture on an algo on which I work actually and who is in my incubator (OOS demo since 10 days)
Small time in market, >1.5-2 Sharpe ratio, STD gain<Average gain and so on
Have a nice day
What algo is that on your last picture, @zilliq?
Nice strat @Paul, I’ll see if it can inspire / improve some of the strategies I am exploring 🙂
@zilliq, what’s your code? 🙂
PaulParticipant
Master
@Tanou I doubt he will show the full code 🙂
About this strategy, made some changes and one part uses mtf
runs on dow 30 seconds timeframe, with adjusted trailingstop
thanked this post
@Paul You’re a legend, thank you for sharing 🙂
Thanks @Paul 😉
However, it doesn’t looks good… A lot of transaction for a 55% win trades and 1.09 profit… :/
Hi Paul, thanks for the new version. I see you are sticking with the old Hull coding as in v10.3
As I’m sure you know, “hullaverage [20] close” (for example) is recognised in v11 but it gives completely different results. I can’t say if it’s better or worse, but worth knowing that the 2 are not interchangeable.
I’m staying with the old-style code as well, as that’s the one I know.
PaulParticipant
Master
@Tanou
that’s no good indeed!
It’s optimised on 100k or 200k I thought. But if loading 1 million it’s bad. Time is too short optimising such amount. The way I was trying find 1 or 2 values out of 4 with normal optimisation on say 100k and set them fixed. WF the other ones. Still it’s difficult to have a good wf results oos.
But I tried such approach in demo after good wf results and it’s positive, but sometimes a max loss can take progress away, therefore the changed trailing stop but I haven’t run that.
@nonetheless Hi, thanks for the reminder. I knew but forgot that completely! Will test too to see the differences.