This is an optimized Donchian Volume Breakout System for the DAX M5 with SMA, Volume, ATR, ADXR, CCI which brings around 1.700 % in 16 months with a 5 Lot in 1 € DAX.
The System only trades from 09 AM to 6 PM.
The idea is to run the system for only a few weeks, and then optimize it again (mainly because of the SMAs and to avoid the negative effects of over-optimization)
Of course you can also use some trailing stop exit or other take profits which can make the system more profitabel (trendfollowing) In this version we have a fixed % SL and TP.
Another idea was to automate it with important resistances and supports but but I was stuck here. Maybe you have some ideas?
//-------------------------------------------------------------------------
// Hauptcode : DC-M5
//-------------------------------------------------------------------------
DEFPARAM CumulateOrders = false
DEFPARAM PreLoadBars = 2000
Handelszeit = CurrentTime > 090000 and CurrentTime < 173000
WochentagOK = (DayOfWeek = 1 OR DayOfWeek = 2 OR DayOfWeek = 3 OR DayOfWeek = 4 OR DayOfWeek = 5) //
//SMA smasteigtwert
SMAsteigt = Average[13](close) > Average[13](close[1]) //smasteigtwert = 100 // 460
SMAfaellt = Average[51](close) < Average[51](close[1]) //smasteigtwert = 90
// Volumen
Volumensteigt = Average[30](Volume) > Average[30](Volume[1])
//VolumenMinWert = Volume > volminwert // volminwert 100
VolumenMinWert1 = Average[100](Volume) > 124 // volminwert 100
VolumenMinWert2 = Average[100](Volume) > 19
ATRminWert1 = (AverageTrueRange[10](close)) > 4.9 // minwert
ATRminWert2 = (AverageTrueRange[10](close)) > 6.9 // minwert
ADXRMinWert1 = ADXR[14] > 9
ADXRMinWert2 = ADXR[14] > 24
CommodityMinWertLong = CCI[20](close) > 131
// Donchian Channel
N = 20 // dcperiod 20
IF BarIndex > N THEN
DONupperBand = Highest[N](High)[1]
DONlowerBand = Lowest[N](Low)[1]
//DONmiddleBand = (DONupperBand + DONlowerBand)/2
ELSE
DONupperBand = Undefined
DONlowerBand = Undefined
//DONmiddleBand = Undefined
ENDIF
PreisUeberDONupperBand = Close > DONupperBand
PreisUnterDONlowerBand = Close < DONlowerBand
Lotsize = 5
IF (Handelszeit AND WochentagOK AND PreisUeberDONupperBand AND ADXRMinWert1 AND VolumenMinWert1 AND SMAsteigt AND CommodityMinWertLong AND ATRminWert1 AND Volumensteigt) THEN
BUY Lotsize CONTRACT AT MARKET
SET STOP %LOSS 0.7 // slwert 0.5
SET TARGET %PROFIT 0.58//SET TARGET PROFIT 4
ENDIF
IF (Handelszeit AND WochentagOK AND PreisUnterDONlowerBand AND ADXRMinWert2 AND VolumenMinWert2 AND SMAfaellt AND ATRminWert2 AND Volumensteigt) THEN
SELLSHORT Lotsize CONTRACT AT MARKET
SET STOP %LOSS 0.7
SET TARGET %PROFIT 0.58//SET TARGET PROFIT 4
ENDIF
Hi HeikinAshi, thank you for sharing with us this nice strategy. Because it has been heavily optimized, as you state in your description, I can’t add it into the library until some robustness analysis had been conducted with the walk forward tool. Did you made some WFA already? 🙂
Hi Nicolas,
thanks for your answer. I did a lot of WFA, but not with this automatic system. Shall I do some and let you know?
Yes please let us all know, but I am going to test it out now anyway.
Thank You for Sharing HeikinAshi 🙂
GraHal
Yes, you should make some. It’s the only way to know about overfitting or not of your optimized variables!