Strategy 3 CANDLES with CAC40

Strategy 3 CANDLES with CAC40

I would like to share a simple meanreverting system that is based on the analysis of the last 3 candles.

A long range of the last 3 candles of at least 10 pips is considered, and for the short side a move of at least 25 pips.

Preferred indices France 40, Ftse 100 and Dax.

Timeframe 1 minute.Target 75 pips, Stop 70 pips and breakeven update every 30 pips.

Suggestions would be welcome.

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. Matteo MC • 11/29/2022 #

    Hello Stanko.
    I hace tested your system ad i’have noticed that it works very well only quen the market is going up.
    So I have added a condition to enter the market :
    i1=triangularaverage[9000](close)
    if i1[0]>i1[1] then
    TRE=1
    ELSE
    TRE=0
    ENDIF
    The system enters long or short only when TRE=1. Whit this filter the equity line on 200k candels becames very better!
    try and Let me know if you are agree with me.

    • Stanko • 11/29/2022 #

      Ciao Matteo MC. Grazie per il tuo consiglio. Ho provato la strategia con tuo filtro ed il miglioramento è stato netto. Le operazioni si dimezzano ed aumentano i profitti. Attualmente sembra ottimo solo per il CAC40.

    • ivan66 • 11/29/2022 #

      Ciao Matteo, scusami , la modifica che hai suggerito, dove e come va inserita nel programma sopra? Ti ringrazio ciao

  2. rominet44 • 11/29/2022 #

    Hello ! stratégie simple testée et donne de bons résultats, bravo. J’ai essayé une petite optimisation qui améliore légèrement le profit jusqu’à 70k unités en backtest, mais apporte des résultats nettement meilleurs sur une plus longue période (140k et plus ) :
    // essais CAC M1 à partir de Strategy3-CANDLES-with-CAC40
    // mis en service le 30/11/22 à 19h30

    DEFPARAM CumulateOrders = False
    timeEnterBefore = time >= 070000
    timeEnterAfter = time <= 230000

    // *** tendance courte *****************
    M8=average[11](close) // 11
    Tm8h=M8>M8[1]
    Tm8b=M8<M8[1]

    UNO = (open[2] – close) > 9*pipsize // 9
    IF timeEnterAfter AND timeEnterBefore AND (open[2]>close[1]) AND (close[1]>close) AND UNO AND Tm8h THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF

    DUE = (close – open[2]) > 21*pipsize // 21
    IF timeEnterAfter AND timeEnterBefore AND (open[2]<close[1]) AND (close[1]<close) AND DUE AND Tm8b THEN
    SELLSHORT 1 CONTRACT AT MARKET

    Malheureusement je ne sais pas comment ajouter le scan du backtest ???
    La strategie est actuellement en test réel.
    Cordialement
    JPF
    ENDIF

    SET TARGET pPROFIT 72// 72
    SET STOP pLOSS 69 // 69

    //startBreakeven = 5 //30 pips in gain to activate the breakeven function
    //PointsToKeep = 10 //5 pips to keep in profit above/below entry price when the breakeven is activated
    //
    // test if the price have moved favourably of “startBreakeven” points already
    //
    // — LONG side

    SCA = 33
    IF LONGONMARKET AND (close – tradeprice(1)) >= (SCA* pipsize) THEN // 33
    breakevenLevel = tradeprice(1) + (SCA* pipsize) //calculate the breakevenLevel
    //place the new stop orders on market at breakevenLevel

    IF breakevenLevel > 0 THEN
    SELL AT breakevenLevel STOP
    ENDIF
    ENDIF
    //graphonprice breakevenLevel coloured(239,21,21)
    // — SHORT side
    IF SHORTONMARKET AND (tradeprice(1) – close) >= (SCA* pipsize) THEN
    breakevenLevel = tradeprice(1) + (SCA* pipsize) //calculate the breakevenLevel
    //place the new stop orders on market at breakevenLevel
    IF breakevenLevel > 0 THEN
    EXITSHORT AT breakevenLevel STOP
    ENDIF
    ENDIF

    • Stanko • 11/29/2022 #

      Ciao Rominet44.
      Grazie per il tuo consiglio.
      La tua ottimizzazione è molto interessante perchè riduce notevolmente le operazioni ed aumenta i profitti.
      Ho notato anche un filtro con la media a 11 periodi.
      Attualmente performa bene per CAC40, DAX ed EUR/USD.

    • Chrisinobi • 11/29/2022 #

      Hallo Rominet 44
      Dein Code gefällt mir ganz gut, zum probieren und testen, kannst du bitte ihn als ITF-Datei hochladen oder so das man ihn gut kopieren kann. Danke

    • KumoNoJuzza • 11/29/2022 #

      Bonjour,
      @rominet44 pourrais tu expliquer à quoi sert le filtre:
      M8=average[11](close) // 11
      Tm8h=M8>M8[1]
      Tm8b=M8<M8[1]
      Il est efficace mais je pense avoir des lacunes sur le trading car je n'arrive pas comprendre le pourquoi du comment. Merci.

    • Nicolas • 11/29/2022 #

      la moyenne mobile 11 période actuelle est ascendante ou descendante, on teste sa valeur vis à vis de sa valeur précédénte.

  3. Stanko • 11/29/2022 #

    In questi ultimi giorni di pesanti vendite nell’azionario il sistema accusa più perdite consecutive perchè, come aveva capito MatteoMC, la maggior parte degli ingressi sono Long. Trovo difficile trovare filtri per limitare i loss consecutivi: rimane opportuno rimanere fuori dal mercato.

  4. shionuk • 11/29/2022 #

    Sorry I am new here. Seen some really good results on forex with 30 mins. I have commented the code as I understand it in an editor. What is SCA? I am not in this domain so if it is obvious please excuse.

    • Stanko • 11/29/2022 #

      Ciao shinouk,
      lo SCA è una variabile che fa salire lo stop loss a breakeven, cioè la posizione non potrà chiudere in perdita. In questo caso lo stop loss parte da -70 e se la posizione supera il +30 il programma fa salire lo stop a +30. Spesso la posizione si chiude subito, ma il target del profitto rimane a +75 e può essere comunque raggiunto.

  5. wally • 11/29/2022 #

    Hola a todos y gracias a Stanco por la maquina principal y a los compañer@s que aportáis modificaciones.
    Para los mas novatos, serian tan amables de poner el archivo ITF, ya que no consigo insertar las modificaciones.
    Gracias por compartir sus conocimientos.

    • Stanko • 11/29/2022 #

      Ciao wally. Grazie per l’interesse mostrato: non riesco a capire che formato sia ITF. Il mio sistema si può copiare ed incollare senza problemi su ProRealTime. La modifica di MatteoMC la puoi aggiungere manualmente. Per le modifiche di rominet44 puoi provare a copiare il sistema qui sopra ed una volata incollato in ProRealTime potresti cancellare i commenti preceduti dalle due barre “//” perchè potrebbero creare confusione.

  6. jim • 11/29/2022 #

    wow

  7. wally • 11/29/2022 #

    Voy a experimentar.
    Gracias Stanko.

  8. BenJuice • 11/29/2022 #

    Merci Stanko pour ton système:) Il marche très bien.
    J’ai vu que Matteo MC avait trouvé un filtre pour optimiser ton système.
    Je n’arrive pas à intégrer sa condition. Pourrais tu m’aider.
    D’avance merci

    • Stanko • 11/29/2022 #

      Ciao Benjiuce, scusa per il ritardo della risposta.
      Prova a copiare ed incollare questo codice:

      DEFPARAM PreLoadBars = 100000
      DEFPARAM CumulateOrders = False
      timeEnterBefore = time >= 083000
      timeEnterAfter = time COND[1] THEN
      TRE = 1
      ELSE
      TRE = 0
      ENDIF

      UNO = (open[2] – close) > 10*pipsize

      IF timeEnterAfter AND timeEnterBefore AND (open[2]>close[1]) AND (close[1]>close) AND UNO AND TRE = 1 THEN
      BUY 1 CONTRACT AT MARKET
      ENDIF

      DUE = (close – open[2]) > 25*pipsize

      IF timeEnterAfter AND timeEnterBefore AND (open[2]<close[1]) AND (close[1]= (SCA* pipsize) THEN
      breakevenLevel = tradeprice(1) + (SCA* pipsize) //calculate the breakevenLevel
      //place the new stop orders on market at breakevenLevel
      IF breakevenLevel > 0 THEN
      SELL AT breakevenLevel STOP
      ENDIF
      ENDIF
      // — SHORT side
      IF SHORTONMARKET AND (tradeprice(1) – close) >= (SCA* pipsize) THEN
      breakevenLevel = tradeprice(1) + (SCA* pipsize) //calculate the breakevenLevel
      //place the new stop orders on market at breakevenLevel
      IF breakevenLevel > 0 THEN
      EXITSHORT AT breakevenLevel STOP
      ENDIF
      ENDIF

  9. calliope • 11/29/2022 #

    Bonjour et merci beaucoup STANKO pour ce code; La première ligne de ce code ressort en anomalie. Quelqu’un peut il m’aider ?
    Merci à tous pour ces beaux partages

  10. Stanko • 11/29/2022 #

    Ciao calliope.
    Per prima riga intendi “DEFPARAM PreLoadBars = 10000” ? Se sì, questa istruzione dovrebbe velocizzare i calcoli per far funzionare la strategia.
    Comunque se lanci una ricerca con “PreLoadBars” puoi trovare tante risposte ai tuoi dubbi.

  11. Patrice210 • 70 days ago #

    bonjour STANKO, effectivement la première ligne apparait en anomalie et je ne comprend pas votre réponse.
    pouvez vous m’éclairer sil vous plait . en tout cas merci pour le code d’origine

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
WE ARE SOCIETY Bonjour, je ne pratique pas le DJ et donc il me faudrait bcp trop de temps pour faire un alg...
KumoNoJuzza Bonjour. Je le teste depuis lundi. Je suis à 37 points de gain sur la semaine soit 37 € à 1€...
WE ARE SOCIETY Bonjour KumoNoJuzza, en réalité ça dépend aussi de la volatilité, chaque période est différe...
Stanko Ciao Crusoe, grazie per il commento: confermo che il trailing stop non funziona bene. Provo ...
taklause I was wondering, you said it works on the 1 min Chart, but you never use it in the code as t...
Stanko Ciao taklause. Utilizzando il grafico a 1 minuto e fino al grafico a 15 minuti il codice fun...
Ciccarelli Franco Hai ragione, mi dava valori alti perchè usavo questo loss "SET STP LOSS 1xAverageTrueRange{1...
YvesRobert Hello davidelaferla, how do you put a stop loss and where exactly ? the moment you enter on ...
Hypersimo Buongiorno Davide a quale distanza inserire stop loss e tp nella strategia? grazie
ProRealAlgos.com Hi JohnScher. Yes I think you refer to the strategy called "Turnaround tuesday". This strate...
JohnScher I am not alluding to the turnaround tuesday. The general opinion is that Turnaroundtuesday ...
ProRealAlgos.com Yeah that's maybe not of importance. Anyway. Enjoy! :)
JohnScher Short variant, see at https://www.prorealcode.com/topic/late-lunch-trade-dax40-strategy/
DANY Hi JohnScher, Thanks a lot for your contribution. Consider this release to avoid overfit...
JohnScher Thank you so much for exploring the Late Lunch Strategy. For discussion and in answer to yo...
BenJuice JohnScher, merci de partager ta stratégie. Je suis nouveau dans ce domaine, sur ton code q...
JohnScher As a percentage of the price, here 2%. StopLoss as well as TargetProfit. SL and TP come ...
Wilko I absolutely love the simplicity of this mean-reversion strategy. Well done!
snucke i dont think you understod the question. i did not ask about the band pass indicator. i as...
thomas2004ch Hi, Is this startegy suitable for daily SPY? Regards
ebous64 Je cherche à traiter des effets de bords avec un encadrement ajustable des variables. Vous a...
JohnScher Postscript: It's running in the live right now. One position after the other is opened. ...
ullle73 nice!! how's it been since your last post on going live? :)
thomas2004ch Hi, Is this strategy suitable for daily SPY? Regards
wally Hola soy nuevo en el mudo robots. Alguien seria tan amable de poner el archivo itf.file ya q...
Darren Nash I found this works well on the DOW
thomas2004ch Hi John, Is your strategy suitable for daily SPY? Regards
cdc.andersson Hello, I´m trying to paste the code and start testing but can´t get it to work in PRT. Shoul...
Lupo32 Thank You Aaron
superfalcio I'm having no more issue on the new Prorealtime release 11.1
kbrooks323 Hello would someone be willing to release a scan code for this? that would be helpful as I s...
Nicolas You can do easily this screener by using the assisted creation tool. It would take you about...
kbrooks323 I just figured it out thanks!
Vinks_o_7 Thanks Doc !
Maxime Baudin Intresting, thank you!
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....
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...
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 ...
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...
avatar
Anonymous Hi robertogozzi - thank you very much for sharing this strategy. I have performed various ...
robertogozzi Thank you samsampop.
Dotan Hello guys I really appreciate this coding effort but can I use this code for Mt5 Forex Trad...
Gubben So far so good. After a long drawdown it was winning four times in five weeks. Since 24 jul...
pat95162 Salut Pourquoi je n'ai pas les même résultats que vous
UkCoopDownUnder Any hints for us, on which variables we should be optimising ? As of November 2020, the cu...
Peter I recognized a possible problem with the timeframe / Defparam variables. As far as I know, t...
superfalcio Hello Peter, it is long time i have been watching this strategy, very good and interesting ...
Peter I indeed do have different modified strategies in the market. In the past my variants perfor...

Top