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
RakeshPoluri I have a question about the bands on the candles. Is it bollinger bands or something else?
Nicolas I think that's 2 Bollinger Bands
Emperor.it "style(line,2)" C'è una guida ai parametri che si possono modificare ? Tipo stile della lin...
IV Mcm https://www.prorealcode.com/programming-with-prorealtime/
supertiti https://zupimages.net/viewer.php?id=20/50/2e3v.jpg
volanirina Bonjour Je souhaite l'avoir sur l'indicateur MT4 si possible s'il vous plait. car je l'ai fa...
Nicolas ProRealCode est un site dédié à l'utilisation de la plateforme de trading ProRealTime: https...
fazel53 How do i attach this indicator to my mt5 platform?
Nicolas You can't! All indicators here are for ProRealTime trading platform: https://www.prorealtime...
Manu L. Bonjour Nicolas, j'ai créé un screener avec l'aide à la prog en TF weekly mais je voudrai...
wtangsiri C'est exactement le même signal que donne le croisement et le décroisement de deux EMA (7 et...
PHAN100 bonjour, j'ai un bug sur le programme recopié prorealtime me dit qu'il y a un problème à ...
PHAN100 bonjour, bravo à l'auteur pour cet indicateur visuel sur le graphique, il nous reste à va...
Nicolas Merci d'ouvrir un sujet dans le forum des screeners en respectant les règles de publication ...
Pensera Bravo Nicolas ! Tu es en quelque sorte l’inventeur de Metascore…(oups je viens de lire jusqu...
Nicolas Dans un but d'investissement pure, et non spéculatif.
Nicolas c'est exactement ce que je fais entre les lignes 58 et 64 pour pouvoir tracer la ligne complète
Italo Fabian Nicolas, Ces matrices sont-elles des vecteurs unidimensionnels ou multidimensionnels? Depu...
Denis Bonjour Nicolas et RicLg, Merci Nicolas pour cet indicateur intéressant et merci RicLg pour...
Nicolas Please open a topic in ProScreener forum with your query, I'll reply you there. Thank you.
manafull Thanks Nicolas, I post my question, along with the codes I am trying to convert from your in...
Nicolas I replied to your post here: https://www.prorealcode.com/topic/screener-for-rsi-and-linear-r...
Nicolas Il faut l'ajouter sur le prix avec l'icône de la clé situé en haut à gauche du graphique du ...
jerome777 merci de ta réponse
jerome777 bonjour c est bon il fonctionne parfaitement merci beaucoup
Madrosat I Have not see a fully functioning automated strategy on your site?? Really have you???
juanj Hi Madrosat, why would it be on my site? I have developed it for my personal use and also to...
Madrosat ok I understood you are using prorealcode to hack the fish
yeoreum Thank you very much for the screener, it reminds me on Minervini VCP. How to change th...
reecet any codes like this but in minutes and hours rather than days?
PHAN100 bonjour, je viens de tester ce screener, je constate une anomalie...il ne renvoie pas l'e...
imonix Have been trying this on demo since Monday before deciding whether to go live with it. Using...
Roberto Blázquez I'm sorry, I've tried it since November 2012 and it's bad results.
Oxxoz Re bonjour Vivien, Il me smeble que 3 mois, c'est 60 séances. Cordialement,
Vinks_o_7 thanks ...and It can be used on a monthly and weekly basis by changing just the duration in ...
nicko Many Thanks Viv. It looks good
Nokis Bonjour Vivien, Comment je peux faire pour adapter ton code afin: De cibler les sociétés q...
sam00075 I tried it today and it gave great results. So a big Thanks !
larouedegann It doesn't work
ggolfet it seems it's not working on prorealtime 11. I changed MACDSignal to MACDSign in order to av...
juanj Please note that the indicator is meant for PRT 10.3
Bard Hi @Vonasi, this is an excellent tool! I noticed you times by 180 and was wondering why? W...
Bard I have no idea what is wrong with the posting on this website. I have problems editing posts...
Bard And now my first post displays okay? It literally had copies of my orig post all added toget...
woktrade Superbe !
Vonasi An updated version with a bug fix can be found here: https://www.prorealcode.com/topic/dis...
snucke hey Vonasi is it possible you can help me get this indicator to show how much a market mo...

Top