Multi Fractals ZigZag High/Low

v10.3
Multi Fractals ZigZag High/Low

Second version of this indicator, first one can be found here: http://www.prorealcode.com/prorealtime-indicators/fractals-zigzag/

This new version draw only High/Low points of the fractals zigzag on chart. It draws major points (green and red squares) which are calculated with a lookback of 20 periods by default (“cp” parameter can be changed at will).

The minor points (green and red dots) are calculated the same way but with the default period divided by 2 (so 20/2=10 periods by default).

This indicator can be used to trade 123 pattern of any other kind of breakout strategies.

 

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. supertiti • 08/03/2016 #

    Bonjour Nicolas
    Quand je veux changer la valeur de CP : l’indicateur plante ! je suis tout seul dans ce cas ?

  2. Traderfox06 • 08/03/2016 #

    Dear Nicolas,
    I receive the following message:
    Fehler im Indikator: PRC_MultiFractalsZigZag (20)Syntax-Fehler: Linie 31, Zeichen 9Eines der folgenden Zeichen eignet sich besser als “(“:– “,”– “=”
     
    Any ideas?
    Thanks and kind regards,
      Michael

  3. supertiti • 08/03/2016 #

    Le changement de la variable CP plante toujours ! il n’y a que moi dans ce cas ?  merci de me donner vos retours
    bonne journée

  4. supertiti • 08/03/2016 #

    Air liquide par exemple, je travaille avec tout le SRD et c’est pareil pour tout.
    j’ai rajouté dans le code : cc = customclose
    d’autre part impossible de remonter une image du message d’erreur dans ce post !? ( vous n’avez pas l’autorisation )

    • Nicolas • 08/03/2016 #

      Ok je vais chercher pourquoi, je n’ai pas eu le problème. C’est peut-être un problème d’arrondi à ajouter au calcul des points intermédiaires.

  5. Fr7 • 08/03/2016 #

    Salut Nicolas
    Est-ce basé sur repaints indicateur zigzag ?

    • Nicolas • 08/03/2016 #

      Bonjour, cet indicateur ne repeint pas. Les Zig et Zag se tracent à la détection des nouveaux fractals.

  6. miguel33 • 08/03/2016 #

    Non c’è nessuna possibilità per  il Fractal zig zag di farlo vedere anche sulla versione 10.2  ?
     

  7. Traderfox06 • 08/03/2016 #

    Salut Nicolas,
    my broker IG told me, that they will not upgrade to 10.3 for a long periodsince they have implemented 10.2 just this year.
    Is there any chance to downgrade this code to 10.2 (guess many user here trade with IG)?
    At least this piece of code?
    I receive the following message:
    Fehler im Indikator: PRC_MultiFractalsZigZag (20)Syntax-Fehler: Linie 31, Zeichen 9Eines der folgenden Zeichen eignet sich besser als “(“:– “,”– “=”
    Many thanks in advance.
    Kind regards,
      Michael

    • Nicolas • 08/03/2016 #

      Hi Traderfox06, sorry but the results with v10.2 would not be the same all, visually. The last fractals zig-zag would be shown on the current candlestick and not well placed on the higher high and lower low in the past (left part of the chart). Of course, if you don’t need it to be visually accurate on what candlesticks appeared the fractals, the returned values are still correct and could be interpreted by an automated trading strategy for instance.
       

  8. Madrosat • 08/03/2016 #

     Bonjour Nicolas
    Il plante chez moi également si je change la valeur cp   et parfois même sans. Je parle bien sur en  version 10 3 
    Pourra t on l’utiliser dans une stratégie??
    Bonne journée
    Madrosat

    • Nicolas • 08/03/2016 #

      Je pense qu’il plante uniquement quand cp n’est pas un chiffre pair ? Si oui, je peux corriger ce problème.

    • Nicolas • 08/03/2016 #

      J’ai corrigé le code, il n’y a plus de problème de plantage qui était dut au calcul d’arrondi des périodes des fractals intermédiaires.

  9. Nicolas • 08/03/2016 #

    For everyone information, code has been updated to fix the crash of the indicator due to bad periods calculation for the intermediate minor fractals.

  10. Madrosat • 08/03/2016 #

    Bonjour Nicolas et bon dimanche
    c’était une question de round !!!   , il ne plante plus  et donne un visuel intéressant.
    J’ai essayé de l’arranger pour avoir des signaux et le tester en backtest voici le code 
    que j’ai essayé de créer mais ça ne marche pas , je n’ai pas suffisamment de pratique 
    pour le modifier correctement , je compte sur toi pour y remédier .
    cordialement
    Madrosat
    //---external parameters Indicateur Multi Fractals ZigZag High Low essais de modifications avec ajouts de signaux
    //cp = 20

    once lastpoint = 0
    ATR = averagetruerange[cp]

    ///---major zigzag points
    if high[cp] >= highest[2*cp+1](high) then
    LH = 1
    else
    LH = 0
    endif

    if low[cp] <= lowest[2*cp+1](low) then
    LL = -1
    else
    LL = 0
    endif

    if LH = 1 then
    TOPy = high[cp]
    TOPx = barindex[cp]
    endif

    if LL = -1 then
    BOTy = low[cp]
    BOTx = barindex[cp]
    endif

    if LH>0 and (lastpoint=-1 or lastpoint=0) then
    signal = 1
    DRAWTEXT(\"º\",LTOPx,LTOPy+ATR/2,Dialog,Bold,20) coloured(200,0,0,255)
    lastpoint = 1
    endif
    if LL <0 and (lastpoint=1 or laspoint=0) then
    signal=-1
    DRAWTEXT(\"º\",LBOTx,LBOTy-ATR/2,Dialog,Bold,20) coloured(0,200,0,255)
    laspoint = -1
    endif

    ////---mino zigzag points
    if high[round(cp/2)] >= highest[cp+1](high) then
    LLH = 1
    else
    LLH = 0
    endif

    if low[round(cp/2)] <= lowest[cp+1](low) then
    LLL = -1
    else
    LLL = 0
    endif

    if LLH = 1 then
    LTOPy = high[round(cp/2)]
    LTOPx = barindex[round(cp/2)]
    endif

    if LLL = -1 then
    LBOTy = low[round(cp/2)]
    LBOTx = barindex[round(cp/2)]
    endif

    if LLH>0 then
    signal=0.5
    DRAWTEXT(\"º\",LTOPx,LTOPy+ATR/2,Dialog,Bold,20) coloured(200,0,0,255)
    endif
    if LLL<0 then
    signal=-0.5
    DRAWTEXT(\"º\",LBOTx,LBOTy-ATR/2,Dialog,Bold,20) coloured(0,200,0,255)
    endif
    return signal as\"signal\"

     

    • Nicolas • 08/03/2016 #

      Ce que tu as fait semble correct pour moi. La variable que tu as nommé “signal” doit correctement retourné ce qu’a était le dernier fractal trouvé sur l’historique. Il ne faut pas oublier que les fractals s’affichent dans le passé et ne sont bien entendu pas affiché en temps réel. On ne peut jamais savoir si on se situe à un dernier plus haut ou à un dernier plus bas en temps réel.

  11. Madrosat • 08/03/2016 #

    Bonjour Nicolas
    merci pour cette précision que je soupçonnais , donc difficile à utiliser dans une stratégie .
    Le code ci-dessus n’est pas bon   La plateforme me retourne : La variable suivante n’est pas utilisée dans le programme : topy   topx  boty botx
    Bonne journée
    Madrosat
     
     

    • Nicolas • 08/03/2016 #

      Ces variables ne sont utiles que pour le tracement des objets graphiques de l’indicateur. Pour les fractals, seules les variables LL,LH,LLL et LLH sont importantes et nécessaires.

  12. Madrosat • 08/03/2016 #

    ok 
    Merci Nicolas

  13. Sofitech • 08/03/2016 #

    Bonjour Nicolas.Est-ce que la V3 permet de créer des trendlines au delà du prix actuel (sur la droite) ?Par exemple, est-ce qu’un indicateur trendline basé sur le Multi Fractals ZigZag High/Low serait réalisable ? Tracer une ligne à chaque nouveau point haut / bas. Une ligne rouge reliant les points haut et verte les points bas.

    • Nicolas • 08/03/2016 #

      Oui ce serait possible. Dans la 10.3, les DRAWLINE se projette à travers tout le graphique, sur la droite et la gauche.

  14. ghary • 08/03/2016 #

    Bonjour,
    Est il possible d’avoir ce code avec la version V2 , n’ayant pas encore la V3 ? Sans forcement avec les dessins, un point à la place devrait être suffisant non ?
    Merci pour les réponses.

  15. Fabio Anthony Terrenzio • 08/03/2016 #

    I made a version for 10.2

    • Nicolas • 08/03/2016 #

      Nice! You could  share them on the Library.

  16. Fabio Anthony Terrenzio • 08/03/2016 #

    I’m sorry, it’s not true

  17. franjue • 08/03/2016 #

    Salut Nicolas,
    une question: cet indicateur repaints que tous basés sur le zigzag?

    • Nicolas • 08/03/2016 #

      Par définition un ZigZag repeint le passé puisque que l’on ne sait jamais si le dernier plus haut ou plus bas atteint est bien le dernier. Sauf que celui-ci ne le permet pas puisqu’il se base sur les fractals et que dans le code je lui indique qu’il ne pourra pas le faire (pas de modification d’un signal plus bas pas un nouveau plus bas). Donc c’est un zigzag “adapté” que tu trouveras dans cet indicateur.

    • franjue • 08/03/2016 #

      Merci Nicolas. Cette semaine, nous allons prouver en temps réel. Je vais vous informer des résultats.

    • Nicolas • 08/03/2016 #

      Bien, mais il ne faut pas oublier qu’un fractal s’affiche dans le passé, pas en temps réel, car il faudra évidemment tester ses conditions .. avant de l’afficher 🙂
      Pour qu’il soit plus rapide, tu peux modifier le paramètre “cp”, à 20 périodes par défaut.

  18. ghary • 08/03/2016 #

    Bonsoir
    Personne n’a réussi à mettre une version pour la V2 ?
     
    Merci bonne soirée.

  19. Assaf • 08/03/2016 #

    Thank you Nicolas for sharing this wonderful indicator with us.
    Can you please advise how can we use the symbols in a scanner. I want to scan all stocks that had symbol drawn on their daily charts in the previous 5 days.
    Thanks,
    Assaf

    • Nicolas • 08/03/2016 #

      I have coded your request. The stock screener is now available in the Library : http://www.prorealcode.com/prorealtime-market-screeners/fractals-stock-screener/

  20. learner • 08/03/2016 #

    Hi Nicholas,
    I am a newbie, just registered on this website today. Is your indicator free to use on Pro Real Time? Thanks in advance.

    • Nicolas • 08/03/2016 #

      Everything’s here is for free! Download and import files into your platform that’s all 🙂

  21. learner • 08/03/2016 #

     Thanks Nicholas for your swift response. With this indicator, the green square is a potential buy while the red square is a potential sell,right? Can this be applied to any market?

    • Nicolas • 08/03/2016 #

      It depends how you trade it. It could also be considered as potential breakout points because of identifying the recent highest high and lowest low. It is only calculated with price information, so yes it is an “universal” indicator.

  22. learner • 08/03/2016 #

    brilliant thanks

  23. learner • 08/03/2016 #

    Hi Nicolas,
    I am getting syntax error with DrawText command while using this indicator. The error is as below:
    One of the following characters would be more suitable than “(“
    Can you please help.

  24. learner • 08/03/2016 #

    Hi Nicolas, looking at the previous posts, you have already answered this question. Is there a code, I could use on version 10.2?

  25. century • 08/03/2016 #

    marche parfaitement, merci pour cet indicateur très utile

  26. faisal1000 • 08/03/2016 #

    Hi,Does multi fractals zigzag high /Low work on Mt4?
    How can i make it working on Mt4?
    Thanks,
     

    • Nicolas • 08/03/2016 #

      Hello this website is dedicated to prorealtime programming. I can help people with PRT and convert MT4 indicators for it, but I can’t help about MT4 related stuff sorry…

  27. ibrahimchauvin • 08/03/2016 #

    Bonjour, PRT peut ne pas reconnaître la valeur CP. Dans ce cas, j’ai simplement modifié le début :
    //---external parameters Indicateur Multi Fractals ZigZag High Low essais de modifications avec ajouts de signaux
    //cp = 20
    Que j’ai remplacé du coups par :
    //---external parameters
    cp = 20
    Un tout petit changement qui débloque le code. Merci pour le partage !

  28. Raul Vg • 08/03/2016 #

    Hello Nicolas,
    The first thing I want to say is: thanks for your work. And the second is: sorry for my english 🙂
    I have a question. Does this indicator use the Zig Zag indicator? I understand that the zig zag indicator can not be used live because it recalculates once passed. 
    So all indicators based on the zig zag flag are 100% winners.
    I ask the question because I see that this indicator has almost total success and I find it impressive if it does not recalculate once passed.
    Thank you very much for your time

    • Nicolas • 08/03/2016 #

      This indicator does not use zig zag at all. It’s built on fractals and it doesn’t repaint. I called it zigzag because it shows peaks and valleys too. 

  29. Seemore Profit • 08/03/2016 #

    Hi for some reason i cant get this indicator to look like yours. Any ideas?
     
     

    • Nicolas • 08/03/2016 #

      What is your problem exactly please?

  30. Johan • 08/03/2016 #

    Hey Nicolas, great stuff! Just starting to play around with it. Can you explain to me how, if i would like to get a fib level between two points (high-low/low-high)?

    • Nicolas • 08/03/2016 #

      Yes, could probably be a good coding exercise, please add a request on forums!

    • Johan • 08/03/2016 #

      Ok. I’ll do that!

  31. Seemore Profit • 08/03/2016 #

    Nothing gets added, a indicator sections opens on the bottom part of the chart but nothing anywhere all blank

    • Nicolas • 08/03/2016 #

      Please add it on price instead. Use the wrench at the upper left side of the chart.

  32. Loop • 08/03/2016 #

    Hi Nicolas,
    would it be possible to have a tradins system based on this indicator?
    I tried but it’s too complicate for my skills…
    Thanks a lot!

  33. geoken • 08/03/2016 #

    Hi! Is there any way to set an audio alarm or pop-out box alert when the fractal appear?  Any suggestions is greatly appreciated. 
    Thank you
    Ken

  34. Stenozar • 08/03/2016 #

    Buongiorno Nicolas, mi scuso per l’ignoranza, ma non ho capito come si può utilizzare questo indicatore. Potrebbe spiegarlo brevemente?
    Grazie!

    • Nicolas • 08/03/2016 #

      Questo indicatore disegna picchi massimi ei minimi basso per determinare le zone di supporto e resistenza. È tutto 🙂

  35. NYORKA • 08/03/2016 #

    Hello Nicolas
    Can this code be transferred to Tradingview charts? Thanks

    • Nicolas • 08/03/2016 #

      Certainly, but I will not do it.

  36. Vin's Regnault • 08/03/2016 #

    Bonjour Nicolas,
    Je tenais  à te remercier pour tout ce travail incroyable que tu fais pour nous !
    Merci quel indicateur de qualité !!
    Je te souhaite que le meilleur

  37. shephinc • 08/03/2016 #

     @Nicolas,
    Thank you for amazing stuff you do here!
    I tried to make this into an indicator but it seems to lag ahead! is this by design or I do something wrong ? 🙂

    • Nicolas • 08/03/2016 #

      It’s not lagging, Fractals are confirmed few bars only after a new peak or trough had been discovered.

    • shephinc • 08/03/2016 #

      Ok! Thanx!

  38. SEBASTIEN DELABOETIE • 08/03/2016 #

    Hello Nicolas,
    Ok, i will try to speak english…
    I suppose this indicator repaint ?… am I right ?
    Thank’s
    Sebastien

    • Nicolas • 08/03/2016 #

      No it doesn’t. Points are drawn afterwards.

  39. Pietro Fontana • 08/03/2016 #

    Hi Nicolas,
    i wanna use this indicator in an automatica trading strategy. but it seems that is not possibile. I’ve changed the code so the function will return the last value obtained  but it seems that it’s not in sync with the draw. It a my error or is not possible to return the value for this indicator?
     
    //---external parameters
    //cp = 20

    once lastpoint = 0
    ATR = averagetruerange[cp]

    //---major zigzag points
    if high[cp] >= highest[2*cp+1](high) then
    LH = 1
    else
    LH = 0
    endif

    if low[cp] <= lowest[2*cp+1](low) then
    LL = -1
    else
    LL = 0
    endif

    if LH = 1 then
    TOPy = high[cp]
    TOPx = barindex[cp]
    endif

    if LL = -1 then
    BOTy = low[cp]
    BOTx = barindex[cp]
    endif

    if LH>0 and (lastpoint=-1 or lastpoint=0) then
    DRAWTEXT(\"░\",TOPx,TOPy+ATR/2,Dialog,Bold,20) coloured(200,0,0,255)
    lastpoint = 1
    last = 2
    endif
    if LL<0 and (lastpoint=1 or lastpoint=0) then
    DRAWTEXT(\"░\",BOTx,BOTy-ATR/2,Dialog,Bold,20) coloured(0,200,0,255)
    lastpoint = -1
    last = -2
    endif

    //---mino zigzag points
    if high[round(cp/2)] >= highest[cp+1](high) then
    LLH = 1
    else
    LLH = 0
    endif

    if low[round(cp/2)] <= lowest[cp+1](low) then
    LLL = -1
    else
    LLL = 0
    endif

    if LLH = 1 then
    LTOPy = high[round(cp/2)]
    LTOPx = barindex[round(cp/2)]
    endif

    if LLL = -1 then
    LBOTy = low[round(cp/2)]
    LBOTx = barindex[round(cp/2)]
    endif

    if LLH>0 then
    DRAWTEXT(\"º\",LTOPx,LTOPy+ATR/2,Dialog,Bold,20) coloured(200,0,0,255)
    last = 1
    endif
    if LLL<0 then
    DRAWTEXT(\"º\",LBOTx,LBOTy-ATR/2,Dialog,Bold,20) coloured(0,200,0,255)
    last = -1
    endif

    RETURN last as \"last\"

    • Nicolas • 08/03/2016 #

      Seems ok to me. However, you can take a look at this strategy that already show how to use it: https://www.prorealcode.com/prorealtime-trading-strategies/fractal-breakout-intraday-strategy-eurusd-1h/

  40. paulon • 08/03/2016 #

    Hi Nicolas. I am very impressed with your work! 
    For real-time charts, could the Multi Fractals High/Low indicator be adapted so that it triggers an alert when a high or low point is created?

    • Nicolas • 08/03/2016 #

      It has been discussed many times, I believe already in the comments of this post or even in the forums. Please make a quick search 🙂

    • Eusebio Garcia Nuez • 08/03/2016 #

      please nicolas, ondas de wolf
       

  41. Real Pro • 08/03/2016 #

    Hi Colin,
    How would one add horizontal lines from the pivot points? I’d like to try to create a system where one buys the breakout above the line. Thankyou.

    • wormtail • 08/03/2016 #

      HI Realpro, did you ever find out how to add horizontal lines from these pivot points?

      Thanks

  42. Abbeymac • 08/03/2016 #

    I don’t understand which folder we’re to put this file. couldn’t find it in my indicator folder after copyin it there, same thing as Template folder. What’s needed to be done, please advise. Thanks

    • Nicolas • 08/03/2016 #

      https://www.prorealcode.com/import-export-prorealtime-code-platform/

  43. maisechogela • 08/03/2016 #

    HI Nicolas,

    Thank you for the indicator. However, I am having a tough time loading the indicator onto metatrader 4, as I am not familiar with the the platform on the youtube video made. Please help

    • Nicolas • 08/03/2016 #

      This website is dedicated to prorealtime programming, these codes are not compatible with MT4!

  44. redz • 08/03/2016 #

    bonjour, tres indicateur, juste une question, les points apparaissent a la cloture de la bougie ou apres confirmation de la suivante ?

    • Nicolas • 08/03/2016 #

      Les points hauts et bas apparaissent après une confirmation de X bougies définis par la variable “cp” paramétrable.

  45. redz • 08/03/2016 #

    et aussi, quand y a le rond et la grille, cela veut dire que le signal est plus fort ?

    • redz • 08/03/2016 #

      donc on peut scalper directement la bougie suivante, tres bon indicateur, bravo encore nicolas

  46. mcha • 08/03/2016 #

    Merci Nicolas pour cet indicateur à variable cp ajustable
    comment relier les points zigzag non pas par classe (points mineurs ou majeur) mais par leur succession alternative de high et de low

    • Nicolas • 08/03/2016 #

      Pour créer un espèce de canal ?

    • mcha • 08/03/2016 #

      Encore félicitation pour cette réactivité.
      Je ne pensais pas aller aussi lojn mais si c’est faisable, les points de contact étant de potentiels point de rebond et on peut aller jusqu’à décompter (comme les vagues d’Eliott au sein d’un canal) cf indice DJ. Encore merci

    • Nicolas • 08/03/2016 #

      Merci de faire une demande spécifique à ce sujet dans le forum ProBuilder. J’y regarderai alors dés que possible.

  47. oeil62 • 08/03/2016 #

    Merci pour le code ,vous dites que l’on peut l’utiliser avec 123 pattern,pourriez vous détailler cela avec un exemple merci

    • Nicolas • 08/03/2016 #

      Vous trouverez de nombreux exemples de ce type de pattern en cherchant sur google 🙂 L’idée étant de détecter facilement les pics et creux avec cet indicateur et d’identifier les breakouts.

  48. Kris75 • 08/03/2016 #

    Here is this indicator with Fibo retracement

    //—external parameters
    //cp = 20

    r=255
    g=0
    b=0

    once lastpoint = 0
    ATR = averagetruerange[cp]

    //—major zigzag points
    if high[cp] >= highest[2*cp+1](high) then
    LH = 1
    else
    LH = 0
    endif

    if low[cp] 0 and (lastpoint=-1 or lastpoint=0) then
    DRAWTEXT(“▼”,TOPx,TOPy+ATR/2,Dialog,Bold,20) coloured(200,0,0,255)
    lastpoint = 1
    NewPeak = 1

    LastHigherBarindex = TOPx
    LastHigher = TOPy

    startbartop = LastHigherBarindex

    else
    NewPeak = 0
    endif
    if LL= highest[cp+1](high) then
    LLH = 1
    else
    LLH = 0
    endif

    if low[round(cp/2)] 0 then
    DRAWTEXT(“º”,LTOPx,LTOPy+ATR/2,Dialog,Bold,20) coloured(200,0,0)
    endif
    if LLL<0 then
    DRAWTEXT("º",LBOTx,LBOTy-ATR/2,Dialog,Bold,20) coloured(0,200,0)
    endif

    if NewPeak then
    fullrange = abs(lasthigher-lastlower)

    fibo236 = lastlower+(fullrange*0.236)
    fibo382 = lastlower+(fullrange*0.382)
    fibo50 = lastlower+fullrange/2
    fibo618 = lastlower+(fullrange*0.618)
    fibo764 = lastlower+(fullrange*0.764)
    startbar = startbarbot
    endbar = startbartop

    //plot fibonacci levels
    if startbarlastplot then
    drawsegment(startbar,lasthigher,endbar,lasthigher) coloured(r,g,b)
    drawtext(“100%”,endbar,lasthigher,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,lastlower,endbar,lastlower) coloured(r,g,b)
    drawtext(“0%”,endbar,lastlower,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,fibo236,endbar,fibo236) coloured(r,g,b)
    drawtext(“23.6%”,endbar,fibo236,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,fibo382,endbar,fibo382) coloured(r,g,b)
    drawtext(“38.2%”,endbar,fibo382,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,fibo50,endbar,fibo50) coloured(r,g,b)
    drawtext(“50%”,endbar,fibo50,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,fibo618,endbar,fibo618) coloured(r,g,b)
    drawtext(“61.8%”,endbar,fibo618,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,fibo764,endbar,fibo764) coloured(r,g,b)
    drawtext(“76.4%”,endbar,fibo764,Dialog,Standard,10) coloured(r,g,b)
    lastplot = startbar
    endif
    endif

    if NewDown then
    fullrange = abs(lasthigher-lastlower)

    fibo236 = lasthigher-(fullrange*0.236)
    fibo382 = lasthigher-(fullrange*0.382)
    fibo50 = lasthigher-fullrange/2
    fibo618 = lasthigher-(fullrange*0.618)
    fibo764 = lasthigher-(fullrange*0.764)
    startbar = startbartop
    endbar = startbarbot

    //plot fibonacci levels
    if startbarlastplot then
    drawsegment(startbar,lasthigher,endbar,lasthigher) coloured(r,g,b)
    drawtext(“0%”,endbar,lasthigher,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,lastlower,endbar,lastlower) coloured(r,g,b)
    drawtext(“100%”,endbar,lastlower,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,fibo236,endbar,fibo236) coloured(r,g,b)
    drawtext(“23.6%”,endbar,fibo236,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,fibo382,endbar,fibo382) coloured(r,g,b)
    drawtext(“38.2%”,endbar,fibo382,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,fibo50,endbar,fibo50) coloured(r,g,b)
    drawtext(“50%”,endbar,fibo50,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,fibo618,endbar,fibo618) coloured(r,g,b)
    drawtext(“61.8%”,endbar,fibo618,Dialog,Standard,10) coloured(r,g,b)
    drawsegment(startbar,fibo764,endbar,fibo764) coloured(r,g,b)
    drawtext(“76.4%”,endbar,fibo764,Dialog,Standard,10) coloured(r,g,b)
    lastplot = startbar
    endif
    endif

    RETURN

  49. JMat45 • 08/03/2016 #

    Thanks for this. Missing a zero in line 18 though.

  50. JMat45 • 08/03/2016 #

    and in line 37…

  51. JMat45 • 08/03/2016 #

    In fact, it seems this code is not quite optimal. @Nicolas, is there a way to incorporate your Multi Fractals ZigZag High/Low code above with the Perfect Trend Line screener (https://www.prorealcode.com/topic/ayuda-screener-indicador-perfect-trend-line/#post-51291) so that when the trendline is broken to the upside for example, it auto draws the Fibonacci extensions on the CD leg (if you think of a typical ABCD pattern)? This would be a similar approach to the Ross Hook, except would flag an entry closer to the BC retracement level than Ross Hook (which triggers an entry when price moves through the B point). Thank you in advance.

    • Nicolas • 08/03/2016 #

      Not optimal for what please? It is possible to combine all codes altogether if you want. Please open a dedicated topic for each of your demand.

  52. marc.schmid • 08/03/2016 #

    Dear Nicolas – your Multi Fractals ZigZag High/Low gives me quite good results – thanks for this! I would like to screen the markets with this Indicator but can not find it under “Screeners”. As I’m quite new here, would like to ask you if you can help. Thanks.

    • Nicolas • 08/03/2016 #

      There must be a lot of screeners built upon this indicator in the forums. First I found is here: https://www.prorealcode.com/topic/multi-fractales-zig-zag-supports-resistances/#post-29985

  53. marc.schmid • 08/03/2016 #

    Thanks a lot Nicolas!

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+41 more likes

Related users ' posts
Nicolas
8 years ago
Loop Hi All! Would it be possible to have the same indicator with the MACD calculated with the DE...
Nicolas Why not, but do you think it would make such a noticeable difference?
Loop Good question Nicolas! That's why I was curious to check it! MACD based on DEMA is usually m...
Leo Hi Gabri, have you ever try this in a trading system?
gabri Leo, I used to crosscheck this indicator a long time ago. For the trading I was doing at tha...
Nolubok Bonjour Gabri, merci pour l'ensemble de vos publications, serait il possible d'avoir le scr...
bolsatrilera
8 years ago
Volume Stops
v10.3
Volume Stops
6
Indicators
Aragorna Hello, ask for a help, please. why the indicator in my PRT is in a different area and not in...
Nicolas Add it on the price chart: https://www.prorealcode.com/blog/video-tutorials/how-to-add-an-in...
Infanta Congratulations. Of all the indicators that I have been able to examine, in my opinion and f...
gabri
8 years ago
Alex975 Wilder personalmente lo definisco un poeta del trading..  Utilizzo alcuni strumenti di Wild...
AleX Vi faccio partecipi dell'evoluzione del mio studio, mi avete appassionato a Wilder che da ig...
gabri Grazie mille Alex!!  
wtangsiri Bonjour J'ai importé le fichier ITF en question, mais cela me donne, en bas de l'écran, un...
Nicolas Il faut ajouter l'indicateur sur le graphique du prix.
skuggan89 This is a great indicator, works very well!! Is there any algo based on this indicator that ...
gabri
8 years ago
Marcel Thank you for this one. I played around with this indicator with Bollinger Bands around it i...
Doctrading Hello, Higher timeframes are better. I suggest D1 or H4.Best regards,
Pinkybouh hello, I propose to add another conditions: ie: haussier: close > open and close >...
TheHovisTrader I'd be interested in the actual profit of this - in the example the stop range is at least 2...
Regan2020 Hi, has anybody update the above code to enable on a 15m or 5m TF?
gigi64 ik heb de code op mijn pro realtime gezet , en bij indicator staat hij erbij maar komt niet ...
gigi64 I have put the code on my pro realtime, and it is on the indicator, but it does not appear o...
supertiti Thanks you so much Lucassen
dreif123 hi, copied the above code, not working on 10.3 the system says "return can only be used at ...
LUCASSEN Hallo , i have no problem , and i have the same versie 10.3, maybe you can ask Nicolas, tha...
Nicolas
8 years ago
Nicolas Para cambiar los colores del histograma, deben usarse las variables r, gyb entre las líneas ...
leofib Hello, I was looking for a MACD Histogram with red and green bars according to the value of ...
Helgart Hi, it's great to have this option of having a histogram coloured based on rising or fall...
Nicolas Rien, il faut l'appliquer sur la charte. Soit le mettre sur le graphique du prix, à l'aide d...
signorini Merci pour votre réponse. Je l'applique sur la charte, j'utilise la petite clé pour effacer ...
signorini Je vous remercie, Nicolas. C'est fixé. Très bon week-end.
owes29 Hi is there anyway to develop this for the pro scanner on daily or hourly scans. so it woul...
Nicolas Of course, please add a query in the proscreener forum.
Bruno Carnazzi C'est dommage, cette histoire d'énergie fractale bousille complètement la précision de l'ind...
otty82  all right. thanks
mmichael Hello, I noticed that the indicator shows the initial balance of today but also for all the ...
leyoy Bonjour, comment l'adapter sur 15 minutes au lieu de 1 heures ... j'ai changé 090000 par 081...
Abz  hi , you need to add the indicator from the "price" menu in chart
Francesco Thank you Abz!
phanz Hi Nicolas, this is an interesting strategy. For long position, I assume entry when prices ...
Krallenmann Hallo Nicolas, kannst du mir die Regeln für den Halftrend Indikator sagen? Aus dem Code kann...
davefransman Dear Nicolas, i want set a alert on the "HalfTrend "custom moving average" met Heikin Ashi w...
Nicolas Please post the question in a new forum topic, that would need custom coding I believe.
zilliq Hi Francesco, Thanks for your code, There is a little error. You need to add the notion of...
Sofitech Hello. How can we modify the code to have an alert on each arrow buy and sell...? RETURN.......
mikael Hi Zilliq! I don`t understand were to put the notion of  reversal (-1/+1). Can you please e...
jelogui merci beaucoup Nicolas, je m'en occupe.
zeD22 Hello There Nicolas, When i try to copy the code i get an Error says: the following varia...
Nicolas Download the itf file and import it.
Nicolas Sorry but we do not provide any help for mt4 users. Our website is dedicated to ProRealTime ...
rginvest44 Bonjour Messieurs et félicitations pour votre travail. De mon coté, lorsque je souhaite e...
Nicolas Bonjour, il s'agit d'un code d'indicateur et non d'un screener. Cet autre code par exemple e...

Top