ZigZag Indicator using Highs and Lows

Forums ProRealTime English forum ProBuilder support ZigZag Indicator using Highs and Lows

Viewing 8 posts - 1 through 8 (of 8 total)
  • #220309

    Dear Nicolas, Dear Members of the Forum,

    I want to code a ZigZag Indicator that uses highs and lows instead of just the close (as the one included in the Platform does) as a reference point.

    I have found some great code for making a ZigZag Indicator (https://www.prorealcode.com/prorealtime-indicators/zigzag-indicator/), but it also uses the close instead of the high for peaks and the low for troughs. Although there is a suggestion of how to incorporate highs/lows in the comments, the version suggested there seems to hardcode the segments to be drawn instead of using arrays, thus limiting the segments that can be drawn. Has anybody got an idea of how the code linked above could be rewritten to use highs/lows instead of the close (or alternatively, how the code in the comments https://www.prorealcode.com/prorealtime-indicators/zigzag-indicator/#comment-12840 could be rewritten to make it possible to adjust the numbers of segments drawn freely)?

    Thank you so much for helping me.

     

    Regards, Nils

     

    1 user thanked author for this post.
    #220316
    JS

    Hi Nils,

    Have you tried the high and low ZigZag code…?

    You can use this code to set how many points (k*ATR) or what percentage (%) should be between the tops and bottoms…

    #220317
    JS
    1 user thanked author for this post.
    #220321

    Dear JS,

    thank you for replying. I have tried the ZigZag Code that you reposted here. The problem that I have is that it draws only 10 Segments, as this is what is hardcoded below line 64. What I want is the possibility to dynamically adjust the amount of segments coded like it can be done with the indicator I linked above (https://www.prorealcode.com/prorealtime-indicators/zigzag-indicator/) just with highs and lows instead of just the close.

    Regards, Nils

    #220323
    JS

    Hi Nils,

    I understand what you want, I don’t think it’s that simple…

    Job for the real experts… 🙂

    #220324

    Yes, I’m hoping for Nicolas, Roberto, or Vonasi, et al. 🙂

    #220573

    Here’s the same ZigZag Indicator (https://www.prorealcode.com/prorealtime-indicators/zigzag-indicator/), with the high and lows instead of close.

    4 users thanked author for this post.
    #220575

    I forgot to do it, but You can put line 13 as comment.

    1 user thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login