PierParticipant
Veteran
A simple strategy based on then increase of the adx slope. Other conditions: the slope of the fast average must be higher then the slope of the slow average the macd less then is average at 16 periods and as further filter I use the supertrend.
The trend line is very good but It seem that It work well only on DAX time frame 1 hour.
p1 =20
p2 = 9
p3=26
mcd = MACD[10,25,9](close)
ave = ExponentialAverage[16](mcd)
st = Supertrend[2.1,19]
v1 = (ABS(adx[p1] - adx[p1][1] )/adx[p1][1]) * 100
v2 = (abs(Average[p2](close) - Average[p2](close)[1])/Average[p2](close)[1])*100
v3 = (abs(Average[p3](close) - Average[p3](close)[1])/Average[p3](close)[1])*100
b1 = v2 > v3
b1 = b1 and v1> v1[1]*2.7
b1 = b1 and mcd < ave
b1 = b1 and close > st
IF NOT LongOnMarket AND b1 THEN
BUY 1 CONTRACTS AT highest[5](high) stop
ENDIF
If LongOnMarket AND (mcd > ave ) THEN
SELL AT MARKET
ENDIF
s1 = v2 < v3
s1 = s1 and v1> v1[1]*2.7
s1 = s1 and mcd > ave
s1 = s1 and close < st
IF NOT ShortOnMarket AND s1 THEN
SELLSHORT 1 CONTRACTS AT lowest[5](low) stop
ENDIF
IF ShortOnMarket AND (mcd < ave ) THEN
EXITSHORT AT MARKET
ENDIF
SET STOP %LOSS 0.93
Hi Pier, thanks for the code.
You did not attached any screenshot to show us the result of the strategy. How did you came with all these variables settings please?
Definitly interesting.
I personally like the use of supertrend as filter, been tampering with the same idea. The macd is also fine and the fact that its long and short is very nice. I do however have a couple of problems with it:
- No money management except stop loss at 0.93% which im guessing is an optimized variable, which leads me to problem #2
- it seems overoptimizied / overfitted / curvefitted. See photo for 200K backtest. Im gonna guess you have optimized with data from 2011 – 2012 -> 2017-2018.
- Amount of total trades are low, over 10 years and just about 250 total trades with an avg of 0.17 trades pr day. This is ofc not a disaster but definitely too few trades to be 99% sure about the robustness of the system, which brings me to problem #4
- Let me start off by saying that in the podcast “better system trader” which features alot of pro traders and legends in trading, there are different opinions on what im about to say.. I know that every market is different, but when looking at strategies like these, the basic indicator filter momentum type of strategies, it should at least be looking “not half bad..” in other similar markets. A system that works in DAX is probably looking like shit in forex (ofc depending on the system/rules) but a system that works in DAX, unless its super-spesific, shouldn’t be SHIT in dow jones/us500/nasdaq etc (as this seems to be)… If the whole system is basicly looking for momentum with basic indicators, why shouldn’t it pick up the same type of momentum that you can find in similar markets? If the system is curvefitted and variables of the indicators have changed a lot, then that system will most likely not work in any other market because its optimized to fit the DAX and DAX alone. For me, thats a slight problem. Doesn’t mean that its not going to work, but it means that it is indeed curve-fitted and the risk of it “not working tomorrow” is too big for me to feel comfy running. But thats just my opinion, some of the legends on the podcast made a point that even if you have overfitted for one spesific market, it doesnt mean its a bad system, it just means its spesific about which market to trade in..
Will put this system in demo and check on it from time to time, thanks for sharing.
some of the legends on the podcast made a point that even if you have overfitted for one spesific market, it doesnt mean its a bad system, it just means its spesific about which market to trade in..
Yes – if for example you have a strategy based more on price action than lagging indicators then it may fit one market very well and another not at all. For example a nice trending market suits ‘buy if there have been three green candles in a row’ but a volatile market that rarely sees three candles of the same colour in a row would not fair so well. If if did see three in a row then it is more likely to go down in a reversal than up in a trend like the first market.
PierParticipant
Veteran
in fact I could only test it starting from 2013 now I see that on a longer historical performance is not so good. it is probably a classic case of over-optimization.
What should I do to have a longer history ?
Thanks for collaboration
What should I do to have a longer history ?
Get a PRT premium account.
https://trading.prorealtime.com/en/ig
In the link above it states … Get the Premium version at no extra cost and save 67 €* per month … anybody where that figure comes from re a saving??
Bit daft of PRT not to explain where / how the saving is made as it leaves the reader confused??
Get the Premium version at no extra cost and save 67 €* per month
Re the * it says … * Price difference between cost of the Premium version and the Complete version on the ProRealTime website.
The Premium version would have to be 67 euros less costly than the Complete version to make a saving??
Or has my brain gone to sleep??
Well as you can get the complete version free with an IG account that means PRT have to give you 67 Euros a month and a Premium version!