DOW Breakout 15Min

DOW Breakout 15Min

Firstly, a big thank you to Nicolas for this great site and for originally introducing us to the CAC Breakout using the same code here.

I set about testing this strategy on other markets due to the fact you can backtest 8 years of data with 200,000 units on the 15Min time-frame. The other massive plus is no fake profits and only 9, 0 bars in 1700 trades! 🙂

The DOW is slightly different to the CAC and DAX breakout. It did not like the first 30 min range but prefers the first hour range BUT we exclude the first 15min candle as you can see from the modifications to the code.

In this version I am using a fixed position size but you can activate the re-invest system if you are happy with that. It makes for an interesting ride!

I stuck to the rules of not over optimising/curve fitting by using an IN/OUT sample as documented here. This ran from Jun 2009 – May 2014.

The results above are £1 Per Point, £1000 Start and 1.8 Spread.

I am live trading this with real money with minimum stakes to test.

All times in the code are UK so please adjust to your timezone.

I have some more of these ported to other markets but need to spend a little more time getting them right before posting in the library. Expect them soon.

I have not had enough time to test different time frames. Maybe I will try that next if time allows.

Good luck and enjoy your trading.

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. Yannick • 09/06/2016 #

    Hi Cosmic
    Thanks for sharing.
    I have think that you have put this line in comment
    Did you try different values or ratio of target profit e.g x 1 or x 2 max amplitude ?
    What were the results?
    //SET TARGET PPROFIT //70 //160
     

  2. Cosmic1 • 09/06/2016 #

    @GraHal Cheers, I think it will make a nice edition to an algo portfolio 🙂
    @Yannick I did add the set target profit line to see if it made a big difference. It does improve things slightly but I decided against it in the end in case of big breakout days being cut short. Feel free to uncomment and have a play. It may suit you?

  3. traderollie • 09/06/2016 #

     thanks for this, back tested it today looks good. 1 question, if i want to use £3 point which do i change?

  4. Cosmic1 • 09/06/2016 #

     PositionSize = 3

  5. traderollie • 09/06/2016 #

    Thank you, I thought it was, also whats the stop distance on the code? is it 9?
    Thank you

  6. ALEALE • 09/06/2016 #

    HELLO I CAN SUGGEST THE FOLLOWING CHANGES TO INCREASE PROFIT AND LOWER DRAWDOWNStartHour = 153500if time = 153000 then..UK TIMEZONETHANKS
     

  7. ALEALE • 09/06/2016 #

    ANDCONSIDERING TO WORK WITH A MAXIMUM OF 20 % DRAWDOWN THE RESULT IS BETTER HAS WITH A PROFIT TARGET 40

  8. Cosmic1 • 09/06/2016 #

    @traderollie The stop distance is initially the MaxAmplitude (160)  Say the first order is triggered long but then the market heads down, the short order would trigger and cancel the long. The stop distance then becomes the daily MaxAmplitude. So you see that it is very rare to take a 160 loss. It only happened twice in 1700 trades. If you check the closed positions list in PRT you will see what I mean. The average loss is 33 points with the above code.
    @ Aleale Setting a 40 point limit creates a lot more 0 and 1 bars which is not good for PRT as it does not look inside bars and it also decreases overall profit. Let your winners run! Changing those times makes less profit and creates a horrible equity curve…

  9. Cosmic1 • 09/06/2016 #

    It was disappointing that this strategy did not capture Friday’s big move down. It fell outside spec and so left it no chance to get on board. Messing with this code to accommodate these days does not seem like the right approach so I am working on a separate breakout code to take care of these days at the moment.

  10. traderollie • 09/06/2016 #

    Thanks cosmic, I find it really useful to understand how you’ve set this up. Shame it didn’t catch the drop on Friday but after back testing it preforms very well.

  11. Daniel da Costa • 09/06/2016 #

    Hi Cosmic! I inserted the code and ran back test but its not picking up any trades, am i missing something? I’m trading in South Africa.

  12. Cosmic1 • 09/06/2016 #

    Hi Daniel, I think you an hour ahead of us? If so, change all times.
    DEFPARAM FlatAfter = 213000
    LimitHour = 210000
    StartHour = 161500
    if time = 154500 then

     

    • JakeDB • 09/06/2016 #

      Hi Cosmic1,
      Thanks alot for this & sorry for being a pest, I am in Melbourne, Australia & thought i had my time conversions down pat, however i cannot get the code to produce positive results which makes me think i have my time conversion up the shit.  NY is 15 hours behind Melbourne/Sydney, I am extremely green with coding so am i entering my time here which converts to the Dow opening time.
      Sorry to be asking such a simple question.
      Regards,  
       

  13. Daniel da Costa • 09/06/2016 #

    Hi Cosmic1! Thanks for the reply, i tried changing the times but no luck. The US opens at 15h30 locally.

  14. Cosmic1 • 09/06/2016 #

    That’s a strange one Daniel. You may need to call IG/PRT unless @Nicolas has an idea?

  15. ALEALE • 09/06/2016 #

    Hello
    why did not you use this setting , you would have problems ?
    MaxAmplitude = 100MinAmplitude = 20OrderDistance = 4PourcentageMin = 20Thanks For your strategy
     

  16. ALEALE • 09/06/2016 #

    the strategy with this setting may have problems ?
     

  17. Cosmic1 • 09/06/2016 #

    Hi Aleale, I’m not quite sure what you are asking or mean but I will take a guess 🙂 The backtest optimisation was performed with an IN/OUT sample as described so running the backtest optimisation again with the whole data will give different results. I’m am running this live with the code above. If you think there is too much risk then of course feel free to adjust to suit your needs. I have confidence in the strategy with the variables above.  Would recommend £5000 in your account to run this live. Hope that helps.

  18. ALEALE • 09/06/2016 #

    I love Lower the drawdown in the strategies

  19. John G • 09/06/2016 #

     Hi cosmic1,
         I’ve really enjoyed getting to grips with your code.  Hows has it been with live trading.  Are your results similar to your backtest.  As there is so much to it if you have time and willing ! ,  could you run through the parameters of the code to us mere mortals……..  You ve made some fantastic coding and i just want to make sure I fully understand it.
         Thanks,
       John
     

  20. Cosmic1 • 09/06/2016 #

    Hi John. Thanks for the comments. The original work was done by Nicolas. This is just a port. I recommend reading these two posts as they explain everything very well.
    http://www.prorealcode.com/prorealtime-trading-strategies/breakout-proorder-french-cac40/
    http://www.prorealcode.com/blog/automated-breakout-trading-strategy-french-cac40/
    I have been running CAC, DAX and DOW for the last 3 weeks and am up around +100 points. So far so good. I will be leaving them on for the next few months to see how they go. They appear to perform the same live as the backtest, as was expected.

  21. mikino • 09/06/2016 #

    googletranslator : than inport for MT4 ? thank

  22. Vish • 09/06/2016 #

    Hi cosmic…. thanks a lot for great strategy. I backtestested this for few days now and went live last night. It doesn’t seem to pick any live trades this morning till 11 AM. I am not even sure if this strategy is working at the back end. I am on IG. How do I validate that it is scanning the market and looking for breakout ? Should I just wait and watch ? Hope it can pick trades up anytime before 1615 on daily basis. Response will be very much appreciated. Thanks…

  23. Vish • 09/06/2016 #

    Sorry My comments above are meant for DAX breakout strategy

  24. James • 09/06/2016 #

    hi Cosmic1,  I’m a newbie here, on IG so I can only backtest 10,000 units to May this year, which shows a 50% win/loss ratio and 82% overall gain in that period. Is that what you’d expect on this shorter timefame for backtest ?

  25. Cosmic1 • 09/06/2016 #

    Sorry wrong pic, DOW…

  26. GAMMA • 09/06/2016 #

    can we used it for other usa index

  27. Cosmic1 • 09/06/2016 #

    Sure, you will need to optimise these variables:
    MaxAmplitude = 160
    MinAmplitude = 20
    OrderDistance = 4
    PourcentageMin = 35
    And possibly the start times and the amount of candles to look at the range.
    Use an IN/OUT sample as suggested in the blog to avoid curve fitting as my description describes.

  28. GAMMA • 09/06/2016 #

    thank you, I have 2 breakout book in pdf   1.the logical trader by fisher mark b 2.range breakout by toby crabel

  29. GAMMA • 09/06/2016 #

    I AM NEWBE SO I  ASKED THIS QUESTION , CODING IS DONE C++?

  30. Cosmic1 • 09/06/2016 #

    From Wikipedia: 
    The ProRealTime software embeds a programming language named ProBuilder derived from the language BASIC. It allows the creation of customs indicators, strategies and market scans. It is also used in the ProBacktest, ProScreener and ProOrder modules of ProRealTime.

    • GAMMA • 09/06/2016 #

      thank you

    • GAMMA • 09/06/2016 #

      how I can change to C## I used ninja trader all the prog have to me in C##
      thank you in advance

  31. GAMMA • 09/06/2016 #

    thank you for detail I open the ac now and used it very soon

  32. GAMMA • 09/06/2016 #

    I try to run in prorealtime and it do not give any  profit and loss, I change the time in computer to uk time, may be I am missing some thing
    need you advise

  33. Cosmic1 • 09/06/2016 #

    You need to change the time in the code rather than your computer. What timezone are you in?

  34. GAMMA • 09/06/2016 #

    usa /new york

  35. Cosmic1 • 09/06/2016 #

    DEFPARAM FlatAfter = 153000
    LimitHour = 150000
    StartHour = 101500
    if time = 094500 then
    I think that is correct. Test and let me know.

    • GAMMA • 09/06/2016 #

      THANK YOU , I WILL FIX IT AND RUN THE TEST ,I WILL KEEP POSTED

  36. Yngve • 09/06/2016 #

    Hi
    can someone explan to me what these variables mean
     
    MaxAmplitude =
    MinAmplitude =
    OrderDistance =
    PourcentageMin =or direct me to a later conversatin on this site where it is explaned?In advance, thank you/Yngve

  37. Cosmic1 • 09/06/2016 #

    Hi Yngve,
    Amplitude relates to the range of the price action for the given times stipulated. 45mins in this case. You could relabel these to MinRange and MaxRange.
    Orderdistance is the amount of points before the breakout level that the order will be set.
    PourcentageMin (should be spelt PercentageMin) is the minimum % of the range that the price has to retrace to validate the breakout. Hope that helps?

  38. GAMMA • 09/06/2016 #

    I try as per your advise and change the time to usa time still no luck, may be I am doing some thing wrong? please advise ?

  39. Cosmic1 • 09/06/2016 #

    Post the code you are using, will try and figure it out. What broker?

  40. sammut • 09/06/2016 #

    Hey Cosmic, 
    Do you typically add a daylight savings adjustment in your code when running back tests over multiple years of data? I’m not sure if I’m the only one who does this however I hope I’m not missing out on a simpler way 🙂

  41. Cosmic1 • 09/06/2016 #

    Hey Sammut,
    I have never done this but I thought about it before but didn’t do anything about it! I just adjust manually at those times of the year that we mismatch with the US. It does of course affect the backtest slightly.
    How do you achieve it in your code? I would like to update the blackest to take account of this.
    @Nicolas, any insight in to this?

  42. sammut • 09/06/2016 #

    I have attached my version of your DOW breakout strategy. Main bits for DLS adjustments are as follows:
    IF ((Month = 3 and Day > 7) and (Month = 3 and Day < 15)) or ((Month = 11 and Day >= 1) and (Month = 11 and Day < 8)) THEN
    //Period over which Daylight savings takes place, no trading during this time
    TradingDay = 0
    DLS = 0
    elsif (Month = 3 and Day >= 15) or ((Month > 3) and (Month < 11)) THEN
    //DLS applies as New York is forward an hour during this period
    // New York time is (GMT - 4)
    DLS = -10000
    else
    // No DLS
    // New York time is (GMT - 5)
    DLS = 0
    endif

    LimitHour = 204500 + DLS
    I also use different variables in my code, probably as I do not have PRT professional yet and have limited data to test on 🙁
    Thanks for posting your code Cosmic, it has been the first algo I have traded live with!

  43. Cosmic1 • 09/06/2016 #

    Looks like a good bit of code. I will take a look later. I’d really like to get this algo back on and running but over the last 10 months or so it has been flat and choppy. Same story with the DAX. I stopped it a few months ago now and have looked since but can’t find a set of variables or equity curve that I’m happy with. What variables are you running?

  44. sammut • 09/06/2016 #

    Hey Cosmic, I am just in the process of re-evaluating my variables due to, as you say, some recent choppy rides. The parameters I optimise are below:

    MinAmplitude
    OrderDistance
    PourcentageMin
    StartHourStep
    RangeExtendStep

    I dont change MaxAmplitude as I want to fix my maximum risk at this stage. I optimise additional variables StartHourStep and RangeExtendStep.I am just realising that I am not able to attach my code in this post for some reason. If you send over your email I can forward my code (.itf files) for you to check out and discuss

  45. Cosmic1 • 09/06/2016 #

    Lets discuss here: https://www.prorealcode.com/topic/cac-breakout-ported-to-other-markets/

  46. rejo007 • 09/06/2016 #

    hello,
    anybody use thi strategy for a long time?
    thanks

  47. abacus23 • 09/06/2016 #

    Hi, I have been trading this strategy and it seems to work quite well recently.

    Is there anyway to insert a piece of code, to only trade, accordingly to yesterday price action. I.e: if yesterday was up, only longs and if yesterday was down, only shorts?

    I did insert a piece of code, but it can’t backtest it, because there is only ever one 2100 line.

    Sorry, the ADD code did not work.

    defparam drawonlastbaronly=true

    if time=210000 then
    value=close
    endif

    drawhline(value)

    return

avatar
Register or

Likes

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

+4 more likes

Related users ' posts
juanj And the point of violation is the close of the candle that violates the line by generating a...
juanj For the latest version of the strategy or to follow updates and developments see the thread ...
phanz i backtested it with 10K units of EURUSD 1 hour i get an equity curve that is going one way ...
rejo007 hello david, i'll try it could you tell me wich strategy do you use in real? thanks
David Somogyi Hello, I have a couple of DAX strategies of breakout and mean reversion. I'll try to post...
Roberto Blázquez Hi David, I just saw your strategy and it's good!!! I'm going to try it from today in real a...
juanj To follow new developments or get the latest version of this strategy please visit the forum...
tahar Hello Juan, I wanted to test Universal Strategy via a demo account on PRT but nothing happen...
BravoDelta @juanj wondering if you may help me please. I am looking for a simply strategy to use on the...
Wing There's a few threads on the forum about backtest and live trades being different at times. ...
ET I agree with verdi55. As it is now, the code will only test for a breakout on the upside (li...
Philipjonasson are u still active Wing?
poonsl2828 Hi! Francesco I have test it on GBP/USD but it only have a trade on 9 Jun which i backtes...
ullle73 why not use 1h chart? has 95% hitrate
ullle73 i see most of positions are only 1 pip before exit?
imokdesign Hi Everybody, when I look at the strategy I felt the need to implement a Moneymanagement-Sy...
Inertia newlevel then multiplier=multiplier+1 oldlevel=newlevel newlevel=strategyprofit+startequi...
Inertia Hi Bjoern, I was playing around with your code this morning (EUR/USD 5'). Thank you to the...
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?
Samitha Prasanna Hi ALE, would you be able to provide the values for the below part of the code (time >=1...
Player Bonjour, J'ai testé cette stratégie sur EurUSD en 1 heures sur 10000 unités et le résultat ...
Player Vue du rapport du Backtest https://ibb.co/8BMrBz6
Nicolas Restart your platform in order to be sure to use the last version, there was a version rollb...
bertrandpinoy bonjour voud pouvez m envoyer le code modifier par vous?
Nicolas Désolé , je ne comprends pas votre question.
Nicolas si il n'y a pas de stoploss définit dans le code, alors c'est normal :)
bertrandpinoy bonjour merci pour la réponse. Oui b sur ... est il possible que le SL soit coder sous une a...
Nicolas ok mais pourquoi poser la question ici ? Pour des questions non spécifique à cette article, ...
Abz  hi , you need to add the indicator from the "price" menu in chart
Francesco Thank you Abz!
phanz Hi Nicolas, this is an interesting strategy. For long position, I assume entry when prices ...
SAM
7 years ago
Elsborgtrading By adding the inside bar breakout failure candle, which is the next bar after the inside bar...
DegoodBoby very nice indicator but pls how can we use the indicator without the text (inside bar/brea...
ShaunG Hi Elsborgtrading thanks for this indicator. I was initially looking for a "IDnr4" which I c...
pascal3431 Salut Doc , Je ne vois pas ce qui fait office de stop dans ce code .. un retour dans le nua...
Doctrading Bonjour, Il s'agit juste d'une stratégie où on est toujours en position : soit à l'achat / ...
pascal3431 Bonjour, après quelques essais sur EUR/USD au M15 en rajoutant(car sinon on est en perte) u...
Doctrading Nice Job ! Here is my version of the code :  KBO = 0 Tenkansen = (highest[9](high)+lowe...
gefinance Thanks for this code. The only thing left missing is the time lapse, otherwise, lots of old...
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...
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...
Nicolas Line 10: Volume of current candlestick must be at least 1.5 higher than the previous one and...
bibifricotin Bonjour Nicolas je viens d'essayer ce screener mais j'obtiens des résultats curieux .Aujourd...
Nicolas Décalage si compte gratuit fin de journée ?
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 ...

Top