Fractals ZigZag

v10.3
Fractals ZigZag

This indicator is a new attempt to draw compatible zigzag for automated trading with ProOrder.

The zigzag are drawn with the new fractal point that is contrarian to the last one.

The “cp” parameter control the depth of analysis to find fractals, higher is the value, deeper are the valleys and taller the peaks. Default value is 20.

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. zilliq • 07/28/2016 #

    Good Job Nicolas,
    But may be there is still a problem as you see on my graph ?
    Have a nice day
    Zilliq
     
    Ps: I can’t post a graph with the forum (Don’t have permission…)
    http://zupimages.net/up/16/30/ue5x.png

    • Nicolas • 07/28/2016 #

      It’s normal. You haven’t read the code obviously 🙂
      As you already know it, PRT don’t allow to redraw past informations. So I disallow the others same informations (in your case a green box), to be shown as the time passing by. But you can change it if you like by deleting all “lastpoint” references in the code.

  2. miguel33 • 07/28/2016 #

    Ciao nicolas,
    anche io non riesco ad inserire il tuo codice .
    mi da errore di sintassi linea 29 e 30 .
    come posso riparare ?
    potresti postare un codice leggibile ?
    grazie 
    miguel

    • Nicolas • 07/28/2016 #

      Questo indicatore è compatibile solo con la versione 10.3 di ProRealTime.

  3. zilliq • 07/28/2016 #

    Thanks Nicolas,
    I didn’t read the code at all 😉
    Have a good day
    Zilliq

  4. supertiti • 07/28/2016 #

    Sur Telefonica n’apparaissent pas les derniers plus haut/plus bas !!??  un commentaire svp
     
    http://zupimages.net/viewer.php?id=16/30/dezu.jpg

    • Nicolas • 07/28/2016 #

      En effet, c’est ce que je viens de spécifier à Zilliq. Puisque on ne peut pas supprimer et retracer des éléments déjà tracés, j’ai pris le partie de ne tracer que les plus haut et plus bas que si le précédent était un signal inverse. Tu peux modifier ce comportement en supprimant tout ce qui se rapporte à “lastpoint” dans le code. Bien entendu, les précédents signaux resteront tracés sur le graphique.

  5. miguel33 • 07/28/2016 #

    Nicolas ,
    con IG si collega alla versione 10.2 
    ho provato ad inserire l’indicatore nella versione in demo 10.3 
    lo accetta ma non si vede nulla esce completamente bianco. 🙁
    cosa miguel immagine dici in proposito ?
    grazie per la tua collaborazione
    miguel

  6. ghary • 07/28/2016 #

    Bonjour je reviens sur cette indicateur intéressant, ne peut on sur la V2 mettre des croix ou autre à la place des carrés coloriés afin d’indiquer le fractale plus bas, plus haut du zigzag ? si oui que faut il remplacer ?
    merci….

    • Nicolas • 07/28/2016 #

      On peut retourner les valeurs de BOTy et de TOPy pour connaître les derniers Fractals trouvés. Puisqu’on ne peut pas tracer dans le passé avec la version 10.2, ces valeurs apparaîtront à partir du moment où elles seront trouvés et donc en décalage par rapport la bougie en question, le rendu visuel ne sera pas du tout le même.

  7. ghary • 07/28/2016 #

    D’accord cela donnerai quoi au niveau du code, je vais voir au niveau visuel si c’est parlant ou pas assez pertinent.. merci pour la réponse rapide…

    • Nicolas • 07/28/2016 #

      L’indicateur en question existe déjà pour la version 10.2, c’est celui-ci = http://www.prorealcode.com/prorealtime-indicators/bill-williams-fractals/

    • Nicolas • 07/28/2016 #

      Suite à une autre demande, un screener pour la détection des instruments ayant eu un nouveau Fractal depuis les X dernières bougies a était codé et est disponible ici : http://www.prorealcode.com/prorealtime-market-screeners/fractals-stock-screener/

  8. Petrus • 07/28/2016 #

    Hi Nicolas. Nice indicator, as always!
    It could be very useful to detect some waves on the graphic. Could it be possible to mark the last 5 points with the text 1, 2, 3, 4 and 5, in addition of the green and red boxes?

    • Nicolas • 07/28/2016 #

      Yes of course, please add a new request in the ProBuilder forum.

    • Petrus • 07/28/2016 #

      Thanks Nicolas. Done.

  9. Eusebio Garcia Nuez • 07/28/2016 #

    ondas de wolf please

  10. maximus78 • 07/28/2016 #

    Ciao Nicolas, potresti fare un esempio di come l’utilizzeresti in un sistema automatico invece del normale zig zag?
    Grazie

    Massimo

    • Nicolas • 07/28/2016 #

      Ci sono già molte strategie che utilizzano questo indicatore nella libreria, basta cercare “zigzag” con lo strumento di ricerca del sito.

  11. pvzyl • 07/28/2016 #

    good day

    I am trading the SA 40 on IG markets , I am using the basics like trend lines and zig zag ,but I don’t see anyone write any strategies on the SA 40 , I want to know why and where can I find some of those

  12. beppe8949 • 07/28/2016 #

    Ciao Nicolas, perchè quando aggiungo l’indicatore, viene aggiunto in basso e non sul grafico? Grazie mille!

    • Nicolas • 07/28/2016 #

      Por favor agrégalo al precio, gracias.

  13. beppe8949 • 07/28/2016 #

    non ho capito perdonami!

  14. JanWd • 07/28/2016 #

    Dear Nicolas,

    I extended your Fractals Zigzag indicator with a minimum percentage of change before a fractal point will be set, like the percentage you can choose in the standard PRT-ZIGZAG indicator.
    This is meant to avoid Fractal Points in a relative flat market.
    I tested the adjusted code, and it seems to work correctly.

    The changes I made are shown in CAPITAL LETTERS below, (all other code remains the same.)
    (I based the adjusted Fractals Zig Zag code on the CLOSE, not on the original high/low in your code, because the original PRT ZigZag indicator is also based on the Close)

    //—external parameters
    cp = cp1 // default 20
    Perc = perc1/10000 // default 2% = highest[2*cp+1](close) AND CLOSE[CP] >= LOWEST[2*CP+1](CLOSE)*(1+ PERC) then //top, base for short <== RENEWED LINE
    LH = 1
    else
    LH = 0
    endif

    if close[cp] <= lowest[2*cp+1](close) AND CLOSE[CP] <= HIGHEST[2*CP+1](CLOSE)*(1- PERC) then //bottom, base for long = highest[2*cp+1](close) and close[cp] >= lowest[2*cp+1](close)*(1+ Perc) then //top, base for short
    LH = 1
    else
    LH = 0
    endif

    if close[cp] <= lowest[2*cp+1](close)and close[cp] 0 and (lastpoint=-1 or lastpoint=0) then
    DRAWSEGMENT(lastX,lastY,TOPx,TOPy) COLOURED(200,0,0,255)
    DRAWTEXT(“■”,TOPx,TOPy,Dialog,Bold,20) coloured(200,0,0,255)
    lastpoint = 1
    lastX = TOPx
    lastY = TOPy
    endif
    if LL<0 and (lastpoint=1 or lastpoint=0) then
    DRAWSEGMENT(lastX,lastY,BOTx,BOTy) COLOURED(0,200,0,255)
    DRAWTEXT("■",BOTx,BOTy,Dialog,Bold,20) coloured(0,200,0,255)
    lastpoint = -1
    lastX = BOTx
    lastY = BOTy
    endif

    RETURN

  15. JanWd • 07/28/2016 #

    Dear Nicolas,
    Forget my previous post, apparently too many text with an appendix, text was mixed up,
    hereby new try:

    I extended your Fractals Zigzag indicator with a minimum percentage of change before a fractal point will be set, like the percentage you can choose in the standard PRT-ZIGZAG indicator.
    This is meant to avoid Fractal Points in a relative flat market.
    I tested the adjusted code, and it seems to work correctly.

    The changes I made are shown in CAPITAL LETTERS below, (all other code remains the same.)
    (I based the adjusted Fractals Zig Zag code on the CLOSE, not on the original high/low in your code, because the original PRT ZigZag indicator is also based on the Close)

    //—external parameters
    cp = cp1 // default 20
    Perc = perc1/10000 // default 2% = highest[2*cp+1](close) AND CLOSE[CP] >= LOWEST[2*CP+1](CLOSE)*(1+ PERC) then //top, base for short <== RENEWED LINE
    LH = 1
    else
    LH = 0
    endif

    if close[cp] <= lowest[2*cp+1](close) AND CLOSE[CP] <= HIGHEST[2*CP+1](CLOSE)*(1- PERC) then //bottom, base for long <== RENEWED LINE
    LL = -1
    else
    LL = 0
    endif

    If you have any comments please let me know.
    Kind regards, Jan

  16. JanWd • 07/28/2016 #

    Dear Nicolas, and others,

    Third comment:

    my solution as presented does not work satisfactory with my previous presented code, sorry. It should present in the graph only fractal points that a x % higher or lower as the previously fractal point, but that does not always appear in the graph, sometimes the next top fractal point is even lower as the previous bottom fractal point, which is maybe caused by the limited bars used for the calculation and the setting of the point of reference, CP bars in the past ?

    Alternatively code below, which is easier to read, but regrettable gives still not my desired result. Sometimes the next top fractal point is even lower as the previous bottom fractal point or vice versa,

    if close[cp] >= highest[2*cp+1](close) and close[cp] >= BOTy[1] *(1+ Perc) then //top, base for short
    LH = 1
    else
    LH = 0
    endif

    if close[cp] <= lowest[2*cp+1](close)and close[cp] <= TOPy[1]*(1- Perc) then //bottom, base for long
    LL = -1
    else
    LL = 0
    endif

    Comments or remarks would be appreciated.
    Nice weekend,
    Jan

    • Nicolas • 07/28/2016 #

      Hi Jawd, good idea. Should be interesting to discuss the code in a separated thread in the forum. I’ll meet you there, thank you.

  17. ullle73 • 07/28/2016 #

    when i add this indicator nothing happens? all black on indicator, same goes when adding it to price chart

    • Nicolas • 07/28/2016 #

      add it on price chart, change the cp parameter according to the period you want to observe for new fractals to pop up. Be sure your PRT platform is version >= 10.3

  18. Robert22 • 07/28/2016 #

    hola buenos días: yo estoy buscando una cosa parecida para realizar con ello un indicador de divergencias con el precio y el RSI y no se donde estais escribiendo sobre éste tema, alguien podría decirmelo?

    • Nicolas • 07/28/2016 #

      https://www.prorealcode.com/prorealtime-indicators/rsi-classical-hidden-divergences-indicator/

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
roccafragius Hello Ivan, another great Indicator, very useful to trace the trend ( blue line) and the pos...
Fgats Ivan can you please explain a line of code that is puzzling me. This is line 37 . As I unde...
teshmi9z Hola, ¿es posible detectar cuándo el precio regresa a la zona del 61 al 88 % de Fibonacci y,...
philippe59139 Bravo super travail
gidien
10 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...
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 ...
Gio56 Bonjour Nicolas J'ai le meme souci que steffen , l'indicateur ne cumule qu'après avoir redé...
Nicolas
1 year ago
Maxime Baudin Well done Nicolas, creative!
Stenozar Hi Nicolas, please can you explain how to read/use this indicator? thanks!
jonpt88 hI . THIS LOOKS GOOD. Thanks. Just one doubt: is this kind of impulse indicator - does it sh...
effegi
2 years 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...
Guibourse Hi, I'd like to increase the thickness of support and resistance lines. I do not think that ...
JJ Tec Hello. Thanks for the great contribution of the indicator. At the moment, I have modified i...
Khaled Hi Vonasi, I tried to embed your PP Fractals code in a Strategy and it seems to be a good fi...
StephFor //ind1 = ZigZagPoint[2*averagetruerange[200]](close) avr = 3 //3% ind1 = ZigZag[avr](close...
Manu L. @Steph un grand merci pour ton aide mais :-( J'ai copier le code tel quel mais cependant j...
AlphaMauss Je n'ai pas réussi à faire fonctionner l'indicateur avec le code fourni en commentaire sur P...
Nicolas Oui le code est correct et il fonctionne, j'ai de bons résultats sur la liste NASDAQ par exe...
pincherman Bonjour :-) J'ai coller le script dans prorealtime pour jouer avec le supertrend et j'ai un...
Nicolas Vous l'avez sans doute collé au mauvais endroit, dans l'éditeur de code pour les stratégies,...
Vonasi There are actually two ways to calculate standard deviations and I seem to have used the ver...
Rory Dryden Thank you. Experimenting with it now.
Wolf Hi Vonasi. Thank for this indicator. I like this calculate concept. I think that line 16 thi...
Vonasi Well spotted! It is just a safety check to ensure that no value below 1 can be used otherwis...
Vonasi Thanks for the compliments. No this is not easily possible in v10.3 because it uses arrays w...
bruces Hi and thank you. I successfully imported original version above and added to my Prorealtim...
Musiar Hi Vonasi, The indicator is working like a charm on PRT v12; trying to adapt it for a strat...
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,...
Bard Very interesting approach Vonasi! I'm getting a 404 error when trying to download though?
Vonasi I just tested and I was able to download with no error.
Psari Hi Vonasi, I am a newbie and was wondering whether you could possibly help me with this pro...
datageek How do I change the thickness of the line or change it too dashed lines? Kind regards
lkiklkik NE fonctionne pas ( ou plus ... )
Nicolas il faut modifier toutes les références à top par itop et bottom par ibottom. Ces mots étant ...
Nicolas change the lastline with: RETURN lastsig and check if lastsig change its value with the a...
nectouxg Hello Nicolas, I will try tonight when I get home, just one last question, I trade the DA...
FXtonio Bonjour, j'ai un problème avec le code, il me dit que ce n'est pas correct ligne 26-27-28: ...
abhay I am getting a shading between the lines, how can I avoid that. I just want to see lines as ...
Vonasi Delete the 'Color Zone' in the indicator settings window.

Top