Automated breakout trading strategy on French CAC40

 

In this article i would like to present you the automated trading strategy that is describe in the French ProOrder / ProBacktest documentation. This strategy is a simple breakout automated system that relies on past market behavior observation, and it works ! I am personally currently trading it with a small account dedicated to it and i must say that it is quiet robust for an intra-day trading strategy.

Entries conditions are simple but smarter than a classic ‘yesterday high/low quotes’ breakout orders.

As European indices are quite “similar” and correlated, this trading strategy may be adapted to any other indices, we’ll have a look by the end of this article.

 

Automated trading strategy “Breakout ProOrder” presentation

A classical Breakout” system first identifies the maximum and minimum values attained by the price over a given time period (in our example, the first 30 minutes of trading after 9am) and then places a buy order on the upper level and a sell order on the lower level.

This breakout automated strategy system takes up maximum two positions per day (sometimes one if any) between 9:30 am and 7:45 p.m.. In all cases, the system is no longer in position after 7:45 p.m., so it is possible to know the gain or potential loss of the day by that time.

This strategy, traded with constant lot made decent profit over the last years :

cac40-breakout-strategy-constant-lot

The version i own reinvest the gain made by the strategy itself in every new trade, as the account grown or decrease in capital. It is my own choice to do it, as this strategy can make high profit in a single day, specially with high volatility like in this past months. Because lost are not so consequent and could be easily re-gain by the strategy, i like to see it working every day with its constant regularity of trade executions that ProOrder offers. I opened a special “mini-account” of about 1000€ specially dedicated to it, as a part of my automated strategies arsenal. So far, the results are promising : (…)

cac40-breakout-2months-result

(…) and conform to ProBacktest. There’s no reason i should stop it for now, it is only 2 months of real trades, but yes we got already 61% profit… Maybe it will not last, but heh ! 61% of free cash security, there’s no doubt this is something we’ll not see everyday, let it play !

The performance with gain re-invest on trade volumes results, as ProBackTest reflects it :

cac40-breakout-strategy-reinvest-gainAs you can see here more clearly than on constant lot strategy, gain re-investment has a major effect on account balance when things go well. As a matter of fact, the cons would be that we may encounter higher losses, but as volume lot calculation use money balance, the loss would be lesser and lesser if the strategy lost many times in a row.

 

The strategy explained

In a breakout strategy, we are always facing the same issue : the false breakout signals. Knowing it, we can assume that there are only 3 different cases of what could happen everyday by trading this strategy (with a buy example) :

breakout-proorder-cases

On first case, we are buying the instrument when a new breakout occur at high level. High and low levels are calculated by looking at the first 2 15minutes bars between 9h00 and 9h30 AM. In this case, things are going well and the trade last all day long until 19:45 (7:45 PM) on which all trades will be close.

On second case we are losing the first buy order, this is a false breakout and we lost the trade by touching the stoploss on the low level. Then we can assume that price is going south and the strategy take a short position which last until 7:45 PM. Gain.

The third case is the worst one. This is something we have to deal with : no clear market intraday trends .. we loose our 2 maximum positions of the day. The smart thing here is that we don’t want to continue trading while we have lost 2 times in a row, on the same day with the same strategy on the same instrument, so we stop trading and wait for the next day for new possible opportunities to trade real good breakout ! By limiting only 2 trades per day, we also know in advance how many money we can afford to loose every day.

To limit the false breakout the strategy introduce a “max amplitude” of the range. If the spread between the high and level is superior of this maximum points range, no trade will be initiated.

 

The code itself

For everyone understanding and code learning purpose, i have translated the code comments from French to English. This automated strategy covers a lot of what we can do with a little trading knowledge with ProOrder. You can also find the .itf file at the end of this article.

 

To conclude

This strategy performs correctly since 2008. It does have common rules of typical breakout strategy, it is not introducing complex calculation with no advanced statistical bias, it deals with no indicators at all. All of these facts are telling me that it could be also effective in the future. I know this one is currently being traded by a lot of people, since it is a part of the ProOrder documentation, so i think it will not be the last time we heard about this one.

 

[edit] : I opened a forum thread to reflect and share my account performance, find it here :

my ProOrder Breakout account performance

 

Share this

  1. Emil Filip • 11/29/2015 #

    You still using this strategy Nic?

    • Nicolas • 11/29/2015 #

      Yes! I am still using this strategy, as explained on forum here : http://www.prorealcode.com/topic/proorder-breakout-on-french-cac40-my-account-performances/
      When i got time, i will adapt this one for other instrument, as i think it has potential : price action/breakout, let the profit roll and cut the loss shortly. It had already made proof that profit is consistent, and in many market situations, no one can predict the future so i have made kind of Monte Carlo analysis to convince myself of its kind behavior, you’ll find them in the forum topic (link above).

  2. ALEALE • 11/29/2015 #

    HELLO NICOLAS,
    TIME FRAME?

    • Nicolas • 11/29/2015 #

      Hello ALEALE, this automated trading strategy is made to work on the 15 minutes timeframe.

  3. Midlanddave • 11/29/2015 #

    Hi Nicolas,
    Thanks for sharing! I am however having great trouble with this strategy, I’ve tried it on all index’s so far with not a single trade being executed in the back tests, on any time frame.
    I’ve used the .itf you kindly supplied with no modifications. Is this .itf you posted correct…or am I missing something?
    Thanks!

    • Nicolas • 11/29/2015 #

      Hello Dave, this strategy is also available in the Library / automatic trading strategies section, here : http://www.prorealcode.com/prorealtime-trading-strategies/breakout-proorder-french-cac40/#comment-100
      In the comments there, Stef spotted something that may caused the strategy not to trade : “not generating orders – is caused by how you choose to display your data WRT time zones (Platform options -> Time zones & Trading hours).”
      Tell me if you can fix this issue by changing time options in your trading platform.

  4. Kit • 11/29/2015 #

    Hi Nicolas: Thank you for an excellent example of the variety and use of tools available in ProOrder.  A couple of questions arising in the code above:1.  In the formula for position size with reinvestment, why subtract initial investment of 1000 from strategyprofit- isn’t strategyprofit already just the profit?  2. OrderDistance is subtracted from the HighLevel to define the entry level for a buy stop- that is at a level below HighLevel, asking price to retrace below HighLevel?…and added to LowLevel to define the sellshort stop level? Is this you intention?  When I back test in a buy situation with no or little retracement from HighLevel (for example 11 April 2016), the program places an order some distance above HighLevel anyway!
    Cheers Kit

    • Nicolas • 11/29/2015 #

      Hello Kit,
      1. You are right ‘strategyprofit’ is already the profit made by the strategy. But here we want to wait until the strategy has already made at least 1000€ of profit to start lot increasing, that’s why 1000 is subtracted to the whole profit.
      2. Yes it is intentional. What we try here is to catch the big moves that could be involved by breaking the LowLevel and the HighLevel that the system has identified. To get better chance of trades executions, we add or subtract the OrderDistance to the Low and High level respectively.

  5. Etta • 11/29/2015 #

    Nicolas
    I tried everything.must I change something for this stategy to work on south Africa cash40?
     

    • Nicolas • 11/29/2015 #

      Maybe start time and position size? Have you tried on 15 minutes timeframe already? This is the timeframe where it should run.

  6. richarjo • 11/29/2015 #

     Etta, did you manage to get the SA40 to work?

  7. richarjo • 11/29/2015 #

     Nicolas, do you know if this code was ever adapted for the SA 40 cash index?

    • Nicolas • 11/29/2015 #

      Sorry I haven’t seen any version for this indice. What is the spread of this one?

    • richarjo • 11/29/2015 #

      Usually 20-25 pips

    • Nicolas • 11/29/2015 #

      That’s huge and that’s why I asked you. I believe that it would be almost impossible to achieve good results in intraday with that kind of spread sorry..

    • richarjo • 11/29/2015 #

      Thanks Nicolas

  8. maxxb • 11/29/2015 #

    salve, ho provato la strategia in proBacktest ma non da i risulti indicati ….
    france 40  (eur 2 mini)
    il codice è uguale a quello indicato ho caricato direttamente il link su PRT… 
    provata anche in test per un mese ma fa poche operazioni molte in perdita e poche in guadagno … posso vedere un rapporto della strategia in reale per capire dove sbaglio …. 
    grazie….
     

    • Nicolas • 11/29/2015 #

      La strategia non esegue così bene per i mesi passati. Ma erano anche gli stessi anni alcuni fa. Continuo a credere questo è una buona strategia nel nostro arsenale di trading. Alcune varianti di questa strategia sono stati sviluppati da altri membri, è possibile trovare in libreria, è sufficiente cercare ‘breakout’.

  9. PRT_kok • 11/29/2015 #

    Salut Nicolas,
    Plusieurs questions -:)

    Dans le guide de programmation “ProBacktest et Proorder” il est dit que le programme a été backtesté sur un mini-contrat CFD France 40. Or, je n’ai qu’une version de démo pour l’instant et je n’ai donc pas accès à ces contrats dans ma liste d’instrument ( du moins c’est mon impression…). Selon vous, puis-je prendre un future quelconque à la place ? Et si oui lequel car leur dénomination est obscure pour moi ( CAC Full116 ( Globex/No globex ), Only / No Only , 1216 ?….). 
    Savez-vous s’il faut cocher la case “Taille des lots” dans le fenêtre de droite ( car il est noté “Forex only” ) ?
    ProOrder déclenche-t-il les ordres d’achat ( resp. de vente ) au cours+(spread paramétré /2) comme je le subodore afin d’être éxécuté ?

    Pourquoi prend-on une taille de position=2 ? La spéc dit certes que c’est le nombre maximal de positions prises au cours d’une journée mais elle ne dit pas que c’est la taille du nombre de contrats à traiter à chaque trade ( il devrait être de 1 , non ?)
    Voilà pour ces questions de novice ( avec mes excuses si celles-ci amènent des réponses évidentes car je viens de découvrir ProOrder hier ).
     
    Cordialement.

    • Nicolas • 11/29/2015 #

      1/ la documentation parle de contrats CFD, donc avec un compte de trading pour les CFDs : https://cfd-trading.prorealtime.com/
      2/ Non, pas utile
      3/ le terme spread dont il est question désigne le “spread” soit l’écart entre les bornes haute et basse, non la différence Ask/Bid.
      4/ 2 était la taille de contrat minimum à l’époque pour le contrat CFD mini du CAC40

  10. avatar
    Anonymous • 11/29/2015 #

    Hi Nicolas, on the 27/10/2016 it did three trades. Do you know why? did it happened also to you?
     
    Thanks

  11. pascal3431 • 11/29/2015 #

    Salut Nicolas ! concernant cette stratégie,je reviens sur la discussion que nous avons eu sur un autre topic concernant l’ajout d’un trailer stop : en effet la cloture automatique à 19h45 ,n’es t elle pas insuffisante dans le cas où dans le case1 ou case 2 ,le marché vient à se retourner (par exemple évènement sur les marchés US à part) et annule tous les gains à partir de 16 h par exemple ?
    Je suppose qu’il faudrait remplacer la ligne
    SET STOP PLOSS MaxAmplitude par SET STOP TRAILING positionprice*x ?

    • Nicolas • 11/29/2015 #

      C’est une idée que tu peux tester en effet. Les backtests de cette stratégie ont validé l’hypothèse qu’il fallait laisser courir les gains plutôt que de les couper prématurément et c’est sans doute ce qui se passera beaucoup plus souvent avec un trailing stop que si nous laissions les éventuels retournements de marché US grignoter les gains potentiels. AMHA 🙂

  12. paulnux • 11/29/2015 #

    Bonjour Nicolas,
    A partir de votre ProOrder serait il possible de faire un indicateur qui donnerait un signal de prise de position ?
    Je préfère garder la main que de tout faire en automatique.
    Cordialement

    • Nicolas • 11/29/2015 #

      Oui ce serait possible en effet de transformer cette stratégie en un indicateur de signaux de trading. Merci de faire une demande spécifique à ce sujet sur le forum ProBuilder, j’y répondrai dés que possible 🙂

    • paulnux • 11/29/2015 #

      Merci Nicolas pour votre réponse.
      Sujet crée : https://www.prorealcode.com/topic/indicateur-a-partir-de-la-strategie-du-proorder-breakout-cac40/
      Merci pour votre aide,
      Cordialement

  13. Demon • 11/29/2015 #

    Bojour Nicolas,
    je teste cette stratégie sur l’indice car je n’ai pas d’accés aux CFD ou Futures. J’ai changé juste l’heure de sortie (17h30) et l’heure de dernière négociation (15h45).
    mais , pour la période 3/07/2018-27/07/2018 j’ai juste 3 trades longs le 3 juillet et 6 trades tous court le 19 juillet!!!!!
    Je précise que je le fais à partir de 2 Probacktest différents qui donnent les mêmes résultats;
    – 1 qui est une importation du fichier ITF de ce site;
    – le second que j’ai créé en copiant le programme à partir de la doc de PRT.

    Ce qui m’intéroge c’est le passage à buyposition =1 (ligne 68)alors que cette ligne est antérieure à l’entrée en position ligne 70. Mais je ne suis pas un as en programmation et j’ai du mal à comprendre l’enchainement des lignes avec les IF THEN ELSE ENDIF mais je me soigne (J’étudie). JJe constate que Pascal 3431 a eu le même problème. J’essaie de trouver la solution, je suis un laborieux.
    Merci et bon weekend.
    Edmond

    • Nicolas • 11/29/2015 #

      “Buyposition” est tout simplement une variable qu’on renseigne avec la valeur 1 pour savoir si on a été LONG au marché. Je vous suggère de regarder les vidéos de formation à la programmation si vous voulez comprendre un peu mieux le code et pourquoi pas l’améliorer ! 🙂
      https://www.prorealcode.com/programming-with-prorealtime/

  14. KumoNoJuzza • 365 days ago #

    Hi old timers 😉 Out of curiosity, do you still use this strategy?

avatar
Register or

Top