Day-Trading the DAX with the Trend

Day-Trading the DAX with the Trend

Hi all !

Here is a very simple code, but very effective, in order to trade the DAX.

It’s a Day trading strategy, but it is designed for H4 timeframe.
It concerns the 3 candles : from 9AM to 21PM.

We go long at 09AM if :
close > 200 moving average
MACD > 0

We close positions at 21PM.

Stop loss and take profit : 1% and 3%

That’s all !

As you see, this very simple trend following strategy is positive (with spread : 1 point), on the last 10 years.
It is’nt before, but I think the DAX CFD trading hours were different.

It should be easy to improve this code, I’ve already made some improvements.
But I prefer giving you the basic and simple (but effective !) code.

 

 

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. Samsam13 • 04/30/2016 #

    Hi
    TP at 3%, isn’t it a bit too much ? Someone knows how many trading days saw the DAX moving than more than 3 % ?
    thanks 

  2. Doctrading • 04/30/2016 #

    You reach TP very very few times.
    Buy it happens on some days.
    Most of the time, you close at evening, that’s all.Without TP ans SL, the strategy is still profitable.

  3. Samsam13 • 04/30/2016 #

    so you count more on the “flatafter” than on tp ?

  4. Doctrading • 04/30/2016 #

    Yes, that’s the way. 

  5. keshejo • 04/30/2016 #

    Hi, i’m from Perú
    The time is 09:00 to 21:00 GMT? 

  6. Doctrading • 04/30/2016 #

    It’s 9:00 on my broker (ProRealTime CFD), so I think it is GMT+1.

  7. Doctrading • 04/30/2016 #

    Hi all,
    Would you trade using this strategy, as it is really profitable since 2014 ?Thanks.

  8. Yngve • 04/30/2016 #

    Hi
    So between 2009 and 2012 you take no profit, thats a long time to sit around and see it do nothing.
    Yngve

    • Nicolas • 04/30/2016 #

      Yes and that’s why a lot of strategies are never published, because people are impatient… This strategy are proof that automated trading work, so just sit and relax, and make profit while doing nothing. 😉

  9. Ad • 04/30/2016 #

    Hi, I am not sure if this is the right way to do this but I see here many professionals that maybe can help here to figure this up…
    I wrote a simple, similar code and its opposite one, i.e., entering in the counter position when exact the same condition occurs, TP3% and SL1%.
    To my overwhelming, when activating the both on the same time frame (Daily) at the same period (last month) I saw days where both came profit.
    Can you explain? Attached is added 
    // Conditions First code// Condition to enter long

    c3L = MACD[12,26,9](close)<0//close < open

    IF c3L and NOT ONMARKET and currenttime > 100000 THEN
    Buy 1000 Cash ROUNDEDDOWN AT MARKET
    ENDIF

    // Conditions to enter short

    c3S = MACD[12,26,9](close)>0//close > open

    IF c3S and NOT ONMARKET and currenttime > 100000 THEN
    SELLSHORT 1000 Cash ROUNDEDDOWN AT MARKET
    ENDIF

    SET TARGET %PROFIT 3
    SET STOP %LOSS 1
    //--- Conditions Second code----
    // Conditions to enter longc3L = MACD[12,26,9](close)>0//close > openIF c3L and NOT ONMARKET and currenttime > 100000 THENBuy 1000 Cash ROUNDEDDOWN AT MARKETENDIF// Conditions to enter shortc3S = MACD[12,26,9](close)<0//close < openIF c3S and NOT ONMARKET and currenttime > 100000 THENSELLSHORT 1000 Cash ROUNDEDDOWN AT MARKETENDIFSET TARGET %PROFIT 3SET STOP %LOSS 1
     

  10. Samsam13 • 04/30/2016 #

    We’re talking about trading, on derivatives, when you could potentially lose a lot. You shouldn’t be talking about “making profit while doing nothing” Nicolas, that sounds so awkward and untrue. I’m testing this strategy and i just had a drawdown of 8 losses, losing 2000 € (in test hopefully).

    • Nicolas • 04/30/2016 #

      8 losses in a row sounds possible in trading. Strategies in library are there because people were kind enough to share what they discovered while coding. FYI, there are a lot of codes that I don’t approve to be featured in. My answer to Yngve may be sound sarcastic, but that’s the way how I talk sorry for that, did I mention I put a smiley? Anyway, 2k€ is how much percent of your demo account?

    • Doctrading • 04/30/2016 #

      The backtest shows a maximum loosing streak of 8 consecutive trades. So it is possible.
      That’s trading, you could also have 8 winning trades.
      That’s also why I don’t like martingale.

  11. Samsam13 • 04/30/2016 #

    hopefully – thankfully

  12. Samsam13 • 04/30/2016 #

    then i’ll have a smiley too
    :-p

  13. Samsam13 • 04/30/2016 #

     
    and thanks for all the advice

  14. Samsam13 • 04/30/2016 #

     
    what i wanted to say, is that if you enter now into this pattern of auto trading, you would have a drawdown of 9 consecutive losses, wich could kill your account, so even with a smiley, please do consider that people that would read you would take what you say very seriously (either clients, or regulators). Some are really seeking for a way to earn money doing nothing in a secure way, we have to be very careful in what we say and the way we say.

    • Nicolas • 04/30/2016 #

      Yes you are right, maybe I need to add more disclaimer? I’m actually trading some automated system that can kill my account and I assume myself the responsibility of my own trading decision. There are no “blackbox” system here, all codes are readable by everyone, they are free and no one are earning money by putting them on this website. I’m not selling ebook or magical potion to make everyone a millionaire, there are also no publicity on the site.
      My attention for the answer I made were to say that criticism is easy when you just click and download. Trading systems that do not make profit even in 2 consecutive years do not invalidate a strategy that work well over a decade. We could have this discussion in every code shared here, sometimes things go bad, sometimes trades go well.. that’s how it goes and no one can change this..

  15. Doctrading • 04/30/2016 #

    Hello Samsam13,
    I hope you are well.  As you can see, some of us post various strategies. But you must understand that :

    these are not definitive and commercial strategies. These a good strategies that we publish for free, as “open codes”. So everyone can use and improve those strategies (the goal is to improve them), but it doesn’t mean that these strategies are always used by ourselves.
    myself, I don’t use all the strategies that I did post, of course ! I use only 3 strategies of my own. And it is less than 10% of my capital. The > 90% of my capital is secured investment.
    Even the better traders who get 100% annual return in trading tournaments have drawdowns… usually 50% drawdown.
    9 consecutive losses doesn’t have to make afraid, depending of the strategy. The rule n°1 of trading is : PROTECT your capital ! So I don’t bet more than 1% risk per trade (when I was a beginner, I did bet 5 to 10% sometimes… it did annihilate my account twice, and nearly a third time). 9 consecutive losses would be 9%. But if the reward ratio is 3:1, only 5 wins would make +15%. See for example the “Breakout ProOrder CAC40” : the winning ratio is low, but the strategy wins on the long term, because average wins are greater than average losses.
    This is what Nicolas wisely said : some losses do not invalidate a good strategy. Maybe we will have soon a “disclaimer” word.

    I hope this helps, and I wish you good trades. You can ask for help whenever.Best regards,

  16. Wilko • 04/30/2016 #

    Dear Nicolas,
    Thanks for posting this! It is always interesting to see what people have found to work. One question: In the picture for the article, the results page shows both long and short positions, while the code is strictly long-only. Is the picture relevant for this code?
    Kind regards,
    Wilko

  17. Wilko • 04/30/2016 #

    Please accept my apologies, I believe I should go to bed instead of posting irrelevant questions. Anyway, thanks again for this post!

    • Nicolas • 04/30/2016 #

      Ahah, I’m not the author of this one 🙂
      I know you are a great coder Wilko, why don’t you post one or two of your findings? Hope to see content from you very soon 🙂

  18. Wilko • 04/30/2016 #

    Thanks for the flattery! I will, I promise. 
    /F

    • Nicolas • 04/30/2016 #

      Still don’t have seen anything from your own 🙂 You promised me! Ahaha 

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
JanWd Thank you for the coding, it seems promising. FTSE gives for the short term (5 min) promis...
Jan Wind 21.04.2019: I retested the strategy for the DAX 5 minutes , it works fine for 10.000 bars, b...
bertrandpinoy hello Francesco, are you still working on this strategy?
avatar
bjoern With the same parameters? For me the results are negative
avatar
bjoern Oh ok, with the initial posted parameters it is positive
victormork yes! It's not like you want to put it on live but when I for example take the version I have...
DEIO Hi sublime06, I tank you for the compliments, but first of all I STRONGLY want to warn yo...
bertrandpinoy Bonjour Deio excusez moi je ne comprend pas le principe du SL et du TP sur votre strategie.....
bertrandpinoy bonjour avez vous un TP et SL pour cette strategie? merci
otty82  all right. thanks
mmichael Hello, I noticed that the indicator shows the initial balance of today but also for all the ...
leyoy Bonjour, comment l'adapter sur 15 minutes au lieu de 1 heures ... j'ai changé 090000 par 081...
Derek Nice strategy. Have you tried adding a stop loss since there are a few sharp drawdowns? I ...
Piston_Broke Non so .... da qui la mia domanda iniziale :-)
Piston_Broke Hi Derek. I have tried many different ways to apply SL's to this and similar versions of th...
Nicolas Indeed, if you are not willing to loose, you will always win. Averaging down losers can carr...
David You're always safer going Long especially with averaging down on an index as the probability...
Oskar Bergvall  I noted Davids and Nicolas remarks. Could it be possible to make an indicator for contraria...
Lotar
8 years ago
Nicolas You can send it to contact@prorealcode.com and I'll attach it here. Thanks for your sharing!
Francesco78 Hi Lotar, which variables would you choose to recalibrate it to the present market condition...
Degardin Arnaud unfortunatly in today's market it's not working at all...
Nicolas it is based on seasonality of DAX.
Luciano Santiago Juárez Hello I am new here I am trying to understand this code IF monthlyMultiplierLong > 0 ...
Luciano Santiago Juárez Sorry the code copied bad the line I dont understand is: ELSIF monthlyMultiplierLong 0 THEN
Wing Yes, investigate as much as you want. For more insight, you can view the linet1, linet2 etc....
CKW Hi Wing, Thanks for your sharing. I am still trying to breakdown & understand your code...
Wing Hello CKW. No, the parameter, 7 in this case, is used when calling the RSI indicator to ide...
Nacho Buenos días Raul, tengo puesto este sistema desde hace unos días en una cuenta demo en la ve...
Dominik Hola Raul ... it looks wonderful :-) Why does it not work if I use less than 100,000 € capi...
Bobbi Hola y gracias por compartir! Descubrí que en 5 minutos teníamos algo muy bueno! Pero no ...
danhei Hi I am tryong to figure out how trist strategy works. I am new to pro real time. Can some...
Plop61 Hello,Thank you for sharing this beautiful strategy.Is it possible to indicate the code for ...
NoName Thank you very much for this fascinating trading system. It is still proving to be extremely...
ALE
8 years ago
pollon Ciao Ale,  anche a me da questo errore  "QQE_QUDAX1HBUY"  "QQE_QUDAX1HSELL"  "UNIV_QUDAX...
reb Hi Ale do you trade these QU strategies?  Are the results same as backtests Thnaks in adv...
avatar
crazytrader Hi anyone that has run this lately?
larouedegann best with this hour IF TIME =081000 THEN plushaut=highest[2](high) plusbas = lowest[2](lo...
CanAny1Trade Hi! I'm trying to put together a similar indicator but struggling. I want to mark the NY Pit...
ALE Hi Pat This code was nothing more than an experiment
pat95162 Hi Ale Do you have same results as me ? The strategy works very well in 2017 and now in 2-...
Nicolas Built on the history means that it suits the history. Always develop ideas in In-Sample peri...
ALE
8 years ago
ALE no, only with TF 15m
enzo_52 Grazie tante, Thanks so much 
JanWd Hallo Ale, First of all, thank you for this strategy. Could you explain what the BLUSTER ...
Elsborgtrading No that is wrong :) 1st runs always- then only run 2nd if 1st is on market with positions(ar...
Elsborgtrading It can only be fully automated if IG change minimum SLto 7 at night on DAX multi timefra...
Elsborgtrading A small example. the strategy would have opened 3 position on Dec 4th 2016 and keept it for ...
Cosmic1
9 years ago
Cosmic1 @JadeDB What times are you putting in?
sincitytrader I tried this one out recently,  and wasn't profitable for me.
Cosmic1 Yes, not great lately. I stopped this live at the end of last year. Will wait to see when th...
Philip Raphael Hey! Thank so much for sharing this wonderful indicator! I have always tried to code a simil...
CKW Hi Philip, What do you mean "Years" are not defined ? candle? If to code yearly candle size...
dakaodo Years not defined was probably b/c Phillip copied and pasted the code into PRT instead of im...
Julio Hi Doctrading, Is it possible to flip this to a "going bearish" by simply switching the cod...
Doctrading Hello, Yes, you can do it very simply...
Tarek Laaroussi Hi doctrading i am the one who sent you the email first thanks for the code . It really wo...
zilliq The reasons why I think it's time consuming and we loose time to try to do backests and Auto...
filiprb Hello Zilliq, You don't need a system to produce a walk forward test. You can easily create...
Philip Raphael It is incredible! Thanks for sharing, Doctrading!

Top