Breakout zigzag ATR version

Breakout zigzag ATR version

This indicator uses a zigzag indicator to measure swing highs and lows. It does so by using ATR instead of % in the zigzag. If the close is beyond the high or low, the instrument will pop up in the screener list for the next 7 bars.

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. DIOS • 11/12/2020 #

    Nice job, Quel est l’indicateur qui permet d’avoir les bandes blanches rectangulaires?

    • Luciole • 11/12/2020 #

      @DIOS : very simple :

      ind1 = ZigZagPoint[2*averagetruerange[200]](close)

      //high boundary
      if ind1[1] > ind1 and ind1[2]<ind1[1] then
      ind2 = highest[5](high)
      endif

      //low boundary
      if ind1[1] ind1[1] then
      ind3 = lowest[5](low)
      endif

      return ind2 as “low”, ind3 as “high”

  2. DIOS • 11/12/2020 #

    Hello, la ligne 9 ,11,13 me sorte en erreur?

  3. Seb • 11/12/2020 #

    @DIOS: take the first part of the code, until the proscreener conditions and return ind2 as high and ind3 as low

  4. DIOS • 11/12/2020 #

    C’est bon j’ai trouvé, ++

    • Equity • 11/12/2020 #

      Hello, would you be so kind, tried to figure your comment out – sorry for asking, i don’t understate it…
      Result

      ind1 = ZigZagPoint[2*averagetruerange[200]](close)

      //high boundary
      if ind1[1] > ind1 and ind1[2]<ind1[1] then
      ind2 = highest[5](high)
      endif

      //low boundary
      if ind1[1] ind1[1] then
      ind3 = lowest[5](low)
      endif

      return ind2 as “high”, ind3 as “low”

      What ist wrong, thanks in advance

    • Equity • 11/12/2020 #

      Dear Seb, would be greatful if you could addtionally post the Indicator. Thanks in advance for your help. regards

    • Seb • 11/12/2020 #

      @Equity: the low boundary part should be this, as in the Proscreener code:
      //low boundary
      if ind1[1] ind1[1] then
      ind3 = lowest[5](low)
      endif

  5. StephFor • 11/12/2020 #

    Bonsoir, j’aime bcp l’idée, merci pour le code. Je l’utilisais sur la version 10.3 sans problème, je viens de passer à la version 11.1, qq chose ne fonctionne plus, on dirait qu’il ne prend pas en compte de calcul du ind1 et donc du zigzag correctement. Si je mets une valeur fixe comme argument du zigzag cela fonctionne bien. Il n’aime pas recalculer le averagetruerange sur les 200 dernières periodes à chaque fois… étrange. Si vous avez une idée, elle est la bienvenue. Merci

    • Nicolas • 11/12/2020 #

      Tout fonctionne pour moi en Daily ou Weekly, sur les listes NYSE et NASDAQ, des dizaines de retour.

  6. Manu L • 11/12/2020 #

    Bonjour,
    je n’y arrive pas 🙁

  7. Manu L • 11/12/2020 #

    @DIOS, pourrais-tu nous founir le programme ou fichier, merci

  8. Manu L • 11/12/2020 #

    J’ai reussi a creer l’indicateur mais ca m’affiche tout simplement une ligne

    //zigzag indicator
    ind1 = ZigZagPoint[2*averagetruerange[200]](close)

    //high boundary
    if ind1[1] > ind1 and ind1[2]<ind1[1] then
    ind2 = highest[5](high)
    endif

    //low boundary
    if ind1[1] ind1[1] then
    ind3 = lowest[5](low)
    endif

    return ind2 as “low”, ind3 as “high”

    • Nicolas • 11/12/2020 #

      la valeur du zigzag est peut être trop grande par rapport à l’UT ou l’instrument choisit !

  9. StephFor • 11/12/2020 #

    Merci, étrange… j’ai le meme problème de ligne décrit plus haut (pour l’indicateur). J’ai mis 2*averagetruerange[200] dans une variable que je vois bien évoluer au fil du temps, mais ind1 reste une ligne à légère croissance tout le long de l’historique… ind2 et ind3 restent donc bien sur à 0 tout le long car ind 1 ne bouge pas…
    Juste por être sur de comment fonctionne le code, à chaque bar 2*averagetruerange[200] est recalculé donc zigzag aussi. Le dernier affichage est se base sur le zigzag du dernier 2*averagetruerange[200] calculé, n’est ce pas ?
    Sur mon dernier calcul j’ai une valeur de 2*averagetruerange[200] à 396 pour un indice à 11 905 (nasdaq daily), et bien sur si je mets la variable de zigzag fixe à 396 dans le code ca marche 🙁

  10. Manu L • 11/12/2020 #

    merci pour ces infos mais je comprends pas tout 🙁 Quelle valuer faut-il changer, comment la calculer,…..

  11. StephFor • 11/12/2020 #

    Difficile de t’apporter une réponse, car le code présente un problème chez moi que je ne comprends pas.
    Pour que cela fonctionne, je suis obligé de remplacer la variable 2*averagetruerange[200] par sa dernière valeur fixe pour avoir un bon affichage. Malheureusement cette valeur va dépendre de l’instrument que tu choisis, donc je dois le modifier pour chaque instrument. Mais logiquement cela doit fonctionner sans faire cela, le code original est bon (ca marche chez plusieurs personnes), perso quand je le fais tourner sur la verison 10.6 de PRT ca marche à tous les coups…

  12. Manu L • 11/12/2020 #

    @Steph, quand tu parles de valeur, le 200 tu le remplaces par quoi exactement ?

  13. StephFor • 11/12/2020 #

    Le 200 ne bouge pas, il corespond au nombre de bars du passé sur lequel on calcule le averagetruerange. Je remplace tout l’élement 2*averagetruerange[200] -qui sert d’argument au calcul du zigzag dans le code- par une valeur. Dans mon example le averagetruerange sur les 200 dernieres bars est de 198, donc x2 = 396. C’est ce 396 que je mets dans le zigzag.

  14. Manu L • 11/12/2020 #

    En terme de lignes de codes, ca ressemble a quoi ?

  15. StephFor • 11/12/2020 #

    //ind1 = ZigZagPoint[2*averagetruerange[200]](close)

    avr = 3 //3%

    ind1 = ZigZag[avr](close)

    //high boundary
    if ind1[1] > ind1 and ind1[2]<ind1[1] then
    ind2 = highest[5](high)
    endif

    //low boundary
    if ind1[1] ind1[1] then
    ind3 = lowest[5](low)
    endif

    return ind2 as "low", ind3 as "high"

  16. Manu L. • 11/12/2020 #

    @Steph
    un grand merci pour ton aide mais 🙁
    J’ai copier le code tel quel mais cependant j’ai 3 erreurs aux lignes 13, 15 ,17 !? J’ai supprime l’un des ind1[1] sur cette ligne if ind1[1] ind1[1] then et plus d’erreur.
    La courbe superieure se dessine bien mais la courbe inferieur n’a pas la meme formel : pas de phenomene de parallelisme rectiligne !

    De plus peux-tu m’en dire un peu plus sur le avr = 3 //3% : a quoi ca correspond
    Et est ce que cet indicateur est utilisable sur tous les UT ?

  17. AlphaMauss • 11/12/2020 #

    Je n’ai pas réussi à faire fonctionner l’indicateur avec le code fourni en commentaire sur PRT 11.1.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Iván Hi! You should change $rbox, $gbox and $bbox variables. Also r,g,b for last box.
finplus Thanks Ivan.
roccafragius Ivan, I just want to say you.. very very great job!!!! Thank you so much for this indicator!...
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
Iván
3 months ago
philippe59139 Bravo super travail
gidien
3 months ago
gidien Thanks for the hint. I think i know now, why this happen. The "settings" block was added by ...
LucasBest Thank you for sharing your work, both original and very disconcerting. When I went through t...
gidien Hello LucasBest, thanks for your comment. Point 1: Yes your are right. The Zigzag ve...
Nicolas Il doit y avoir impérativement plus d'unités affichées que le paramètre "BarsLimit". Ceci ét...
steffen_burat Hello Nicolas, I have a cumulative histogram update problem, the indicator often updates ...
taklause Hello Nicolas, if I try to use your indicator in a trading system, the error on prc pops up ...
jonpt88 hI . THIS LOOKS GOOD. Thanks. Just one doubt: is this kind of impulse indicator - does it sh...
effegi
1 year ago
effegi A good alternative solution, even I had thought of the variant that uses high and low (proba...
Seb did you automate that 1-2-3 strategy? how is that working for you?
effegi Not yet, I'm busy developing other strategies/indicators at the moment, but it's on my to-do...
Xenotrax A première vue, sa à l'air d'être un indicateur très puissant sur de petites temporalités, j...
merri Bonjour Nicolas, Comment transformer cet indicateur en bot sur PRT ?
Nicolas Cela a déjà été fait, voir ce sujet: https://www.prorealcode.com/topic/strategia-con-lindica...
Nicolas Oui c'est possible. Merci de ne pas poster des demandes qui sont hors sujets. Pour les deman...
Igor Merci pour cet itf. Question : comment faire pour instruire un screener ?
Nicolas tester le croisement du Close avec la première valeur de l'indicateur : "TrailingStop", faci...
supertiti Bonjour Nicolas, Je ne comprend pas bien , le trend change de couleur quand les prix sont a...
Nicolas Oui ce serait possible, cependant l'indicateur est bien prévu pour conserver la couleur de l...
supertiti Quand tu pourras si tu peux nous coder la troisième couleur cela améliorerait les trades cou...
Nicolas remplacer les valeurs de coloured(0,255,0) par coloured(r,g,b) et ajouter ces noms de variab...
mohamed merci Nicolas!
sacram14 Merci Nicolas pour ce set-up que je ne connaissais pas ! J'ai tenté de reprendre le code pou...
Meta Signals Pro Pleasure ! Please let us know if you make good trades with it and if you see improvements we...
francis59 Bonjour, Bonjour, comment puis-je créer un screener basé sur cet indicateur, qui affiche le...
Trader Sab I am curious to try it how, however I get an error message for line 47 and 48 - drawsegment,...
Nicolas Just add it on the price series.
yomisadiku Hello Nicolas, Can I use high and low price at lines hh=max(hh,close) and ll=min(ll,close) ...
Nicolas Yes you can do that, the impact will be that the trailing stop line will be much close to th...
LucioleLucide Clean view, thanks for sharing
dertopen hi where i can found the window for candle configuration?
paolosab69 Ciao! . I have seen the pictures that explain this metod but i don't understand when is mome...
Thomas
5 years ago
Thomas Como? no intiendo. Can you write in english . It works! Download the itf file.
Thomas New Version comin soon...
CHARLESRACHELLE OLA NAO SERVE PARA MT4?

Top