The “DAX Donchian Breakout” strategy

The “DAX Donchian Breakout” strategy

Hi all,

Here is one of my simple strategies. With a little help from someone, here is the code with optimization.

The strategy is using Donchian breakout, with MACD, RSI and moving average as trending indicators.

The code is so simple that I won’t write a long description.
Seems to be effective !

Best regards,

This strategy is suitable for : DAX, H1 (1 point spread, tick by tick)

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Daniel da Costa • 03/18/2018 #

    Thanks Doc! Where can you find a service for Dax with a 1 point spread?

    • Doctrading • 03/18/2018 #

      Hello. I suggest you : ProRealTime CFD, or IG.
      Best regards,

  2. JanWd • 03/18/2018 #

    Hey Doctrading,

    I tried your code, optimising the A and V and the RSI period, see below.
    Seem to work very promising, but only for one year, from april 2017 to april 2018 It does NOT gain a profit for a period before that period, from april 2016 to april 2017 the net result is zero (1,8 point spread)

    This poverly performance further back in the past happen very often with my algo models as well, —> how do you deal with this phenomenon ?
    Looking forward for your thoughts,
    Thanks, Jan
    ===============================
    Your code optimised with 3 variables, speaks for itself:
    //https://www.prorealcode.com/prorealtime-trading-strategies/dax-donchian-breakout-strategy/
    // ALLEMAGNE 30
    // H1
    DEFPARAM CumulateOrders = False

    // TAILLE DES POSITIONS
    N = 1

    // MACD histogramme
    iMACD = MACD[12,26,9](close)

    // Donchian
    // Pour le DAX : A = 9 et V = 7
    A= a1//9 default, variable optimization
    V = v1//7default, variable optimization

    DonchianSupA = highest[A](high)
    DonchianInfA = lowest[A](low)
    DonchianSupV = highest[V](high)
    DonchianInfV = lowest[V](low)
    iRSI= RSI[R](close) //4 default, variable optimization
    OneTradePerDay = IntradayBarIndex iMACD[1]
    ca2 = iMACD >= 0
    ca3 = close crosses over DonchianSupA[1]
    ca4 = iRSI > 63
    ca5 = close >= average[50]
    IF ca1 AND ca2 AND ca3 and ca4 and ca5 and OneTradePerDay THEN
    buy N shares at market
    ENDIF

    sell at DonchianInfA stop

    // VENTE
    cv1 = iMACD < iMACD[1]
    cv2 = iMACD <= 0
    cv3 = close crosses under DonchianInfV[1]
    cv4 = iRSI < 31
    cv5 = close <= average[500]

    IF cv1 AND cv2 AND cv3 and cv4 and cv5 and OneTradePerDay THEN
    sellshort N shares at market
    ENDIF

    exitshort at DonchianSupV stop

  3. Glen Marquis • 03/18/2018 #

    This will work as there is plenty of room for the Target before the Stop, yet the Stop would be hit first far more frequently, hence the equity curve nothing at all as per real time.

  4. magicT • 03/18/2018 #

    I did a copy and paste of this code and PRT 10.3 returns a synthax mistake:

    OneTradePerDay = IntradayBarIndex iMACD[1]

    Can you clean this error please ?

    Thanks.

  5. ak5hay2 • 03/18/2018 #

    Works like crazy on bitcoin. Use different timeframes. Thanks a lot Doc!!!

  6. richyowen • 03/18/2018 #

    Hi, great code thanks. Very new to this forum. Is there a way to add a 100point target on any position taken?

  7. lisamitch50 • 03/18/2018 #

    Morning all, Just backtested on quite a few instruments, worked well on backtesting, but tell me – How do you then implement the cross strategy? it tells me which crossing strategy was best (For what i am looking for {Drawdown / gains / % winners etc}, but not what average that is.?? I see that that for example, MAType was 14 and MATypeV2 61 worked for me the best on the instrument i want to use it on, but – 14 i a Fractal Adaptive Moving Average and 61 is a Zero Lag BMT?? Do i copy and paste the chosen code for each strategy Number? I would love to chat about this a LOT more. Thanks.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+8 more likes

Related users ' posts
ribes65 Bonjour Nicolas, Merci pour votre travail. Est-il envisageable de créer un screener pour ...
Nicolas Bien sûr, merci de formuler une demande dans le forum des screeners pour prorealtime. En res...
ipbvba Est il possible de le transformer en indicateur (pour ne plus avoir les lignes mais uniqueme...
Vinks_o_7 Vonasi you're a beast !!! ;-)))
pableitor Amazing indicator , you are pushing PRT to the limit! But looking at the scatter its not c...
frenqle Hi There.. It seems the TSL stop loss is not working.. it does not respond is that correct?
Ciccarelli Franco Per lasciare che la strategia venga eseguita (dopo aver importato il file): Basta eliminare...
JADINVEST Hello Jan, hello everyone, Thanks Jan for this strategy! Since 2020, have any of you found a...
carpentier Joffrey Bonjour à tous, Avant tout merci pour ce travail, cependant je suis bloqué quand je l'insta...
carpentier Joffrey Re, C'est ok, j'ai trouvé mon erreur... Cependant sur quel base peut on calculer son CALC...
Aragorna Hi Nicolas, How is it possible to use it in a higher timeframe plotted on a lower timeframe?...
FXmike hey my friends, thank you for this great code. my problem is he make no trade open. backtest...
FXmike Can i put a Action that my start contract is smaller than 1 ? 0.3 or 0.5 ? In wich Position...
phoentzs I wrote the code for M15 back then and also variants in H1 and M1. Everything works so far....
stephane2.0
4 years ago
stephane2.0 c=exponentialaverage[9](MACDLine[12,26,9](close))
Forexcheckup Hi I down loaded the ITF file, it paints red for a down trend but for all up trends the can...
stephane2.0 line 22: r = 195 by r = 0 line 23: g = 195 by g = 0 line 24: b = 195 by b = 255 ;)
Zigo
4 years ago
fifi743 Good morning, there is no mistake about the shorts c11=SMI[14,3,5](close)>-40
Zigo has to be c11=SMI[14,3,5] < -40 (indeed)
xar3 Thank you ;-) Zigo
Jan Wind Thanks for sharing ! The Gain/Loss ratio is a bit low, 1,16, hardly offset the risks take...
drive whats the period ?
Lucas0000 Hola. estoy buscando un programador en proorder, para hacer un programa basado en el Q-trend...
Ludwig Bonjour Merci pour le code, je souhaite intégrer un break even et mette en place un réinves...
superfalcio hello, this strategy is pretty interesting, anyway on index after diferent suggestion and im...
Fralex Hello everyone I optimized the original “LongOnly-DAX-4H-TMA-Channel” algorithm over a pe...
Alps007 Hi Nicolas. Happy New Year. Can you please program me several MACD divergence screeners ...
Arlei Zanin Hello Nicolas, would it be possible to convert the Cloud to Pascal language? Thank you.
ashee i want it in MT4
Marie-Eve Vergoz Bonsoir - Voici l'erreur qui est signalée lorsque je souhaite utiliser cet indicateur : il...
Sapo Thank you very much. as always your indicators are extremely effective. kind regards Vonasi.
mitsu21 Hi, it looks nice. I'll try it tomorrow thank you for your share kind regards bruno
kj1988 Thank you Vonasi for sharing this indicator. Very useful as a comfirmation to the price act...
Byggtrader Hi Nicolas! How do I get the indicator in the price chart? It only stays under i new chart.
Nicolas Just add it on the price chart by using the wrench on the left upper side of the chart (pric...
Dom Hello, hello....je commence le trading et découvre par la même occasion le codage....et ce n...
Nicolas Merci, ça fait plaisir !
Be-n Bonjour tout le monde ! Dans l'indicateur de tendance, j'ai du mal à saisir la nuance entre ...
Vonasi Sure that is possible. I will code it and make a post in the English ProBuilder forum and pu...
Vonasi Vama v2 with Hull moving average included can be found here: https://www.prorealcode.com/top...
JMat45 Thank you, Vonasi.
Nicolas
5 years ago
LRMA
LRMA
0
Indicators
Vinks_o_7 Thanks again Vonasi !
Bard Thank you, this is a great tool @Vonasi, especially for those that used to like shorting Ind...
Aragorna Hi Vonasi, is there a reason why it does not work anymore in new version ePRT Platform? tha...
YvesRobert @robertogozzi. It's done. Thank you
YvesRobert Hello Roberto, some questions about your strategy. 1 - Do the 2 lines SET TARGET pPROFIT T...
robertogozzi 1. The 2 lines SET TARGET pPROFIT TP and SET STOP pLOSS SL are always executed, each bar. Bu...
sycomore Ça ne fonctionne sur aucune valeur, je dois être trop con...
Nicolas il faut appliquer l'indicateur sur le prix.
AntoGH Je crains de ne pas comprendre... Cela indique la probabilité de la prochaine bougie ou donn...

Top