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
Jean-Pierre Poulain When I buy and when I sell ?
Nicolas The featured image of the post do not deserve the indicator you are right, I attached other ...
Nicolas It is described in the post already :) The BUY/SELL signals are quite similar of what you ca...
fabio407 Thanks, Nicolas. Very useful. Would you tell me where to find what result conveys the functi...
Nicolas This is not an instruction of the programming language but a variable from this indicator (l...
fabio407 OK. I didn't notice it. Many thanks, Nicolas!
albertocampagna Sei grande Nicolas :-)
SAcht Dear Nicolas, Great work, thank you very much!I would love to use the indicator in ProScree...
SAcht btw: The above-posted ProScreener is supposed to show stocks for which the center line has i...
victormork Hi, I would just like to share my own take on this strategy. I'm using 30 min on EURUSD but ...
mckubik Thanks. I will run a Test. 
poonsl2828 Hi! bjoern May i know what timing should i change for time zone (Singapore (GMT +8:00) ...
julien1978 The ADR value that is plotted intraday does not match the value of the regular ATR indicator...
Fab666 I've tried to get a fix for this also but no luck, it doesn't print the correct data as far ...
Seabiscuit Hi! With the new PRT update, this indicator does not work anymore
Guibourse Hi ! I am asking once again for your help : would it be possible to use the ATR as a "take p...
Tradingrob Many thanks for the indicator, however if the price is below the indicator, then the indicat...
aldtrading Merci pour ton travail ! J'ai de bons résultats en utilisant cet indicateur
Nicolas Use the wrench of the price chart! Upper left of the window
Dymjohn The wrench shows options for the components of the indicator not how to show in the main cha...
Nicolas http://www.prorealcode.com/topic/overlapping-indicators/  
Nicolas
8 years ago
Nicolas add it on price chart, change the cp parameter according to the period you want to observe f...
Robert22 hola buenos días: yo estoy buscando una cosa parecida para realizar con ello un indicador de...
Nicolas https://www.prorealcode.com/prorealtime-indicators/rsi-classical-hidden-divergences-indicator/
David Thanks for the explanation Nicolas.
freecat1899 Hello, I wanted to create a percent ADR based on this indicator, so I wrote this code that I...
revstrat At first glance, I see this mistake. You shouldn't average the highs and the lows. You shoul...
Investment Account Wow great thanks ... looks good! Do I set the colour shades up from within the indicator 's...
avatar
Anonymous Thanks for your comments and yes, that is exactly how I set up the colour levels.
Vish Thanks I have added this in my watch list. Has anyone tried it yet ? Does it work on currenc...
PeterClothier Hi, I downloaded this indicator and imported it. I tried adding it to a chart , and it hasn'...
Nicolas Don't add it on the price, so just don't use the price setting to add the indicator.
Nicolas
9 years ago
petmut Hello all, When I import the code here above "multiple ATR bands" and apply it on the PRT ...
Nicolas That should need some custom coding, if you want to make it done, please open a new topic in...
Patopercho Hello, thanks for the indicator, i would like to change the color, is it possible, thanks

Top