understanding the zigzag indicator

Forums ProRealTime English forum ProBuilder support understanding the zigzag indicator

Viewing 4 posts - 1 through 4 (of 4 total)
  • #81879

    hello

    the last chapter of the advanced programming course is creating a complete zigzag indicator and I would like to clarify my understanding of how the code (copied below) works.

    The parts I would like to unpack are determining the percentage variation which is then compared to the defined % variation (specified or dynamically).

    Peakpercent = (higher – close)/higher

    troughpercent = (close-lower)/lower

    Taking the peakpercent, it seems higher is being compared to the current close rather than the close of the last trough?  Any explanation or insight would be greatly appreciated.

    thanks

    Chris

    #81881

    Please use the ‘Insert PRT Code’ button when posting code in the forums as it makes it far easier for others to read. I have tidied up your last post for you. 🙂

    1 user thanked author for this post.
    #81913

    Chris, I deleted the code from your post. This one is only available for the people who have bought the course 😉

    To detect that a new peak has formed, the higher price must be compared to the current Close. If it has achieved a retracement of X percent, the peak is confirmed.

    1 user thanked author for this post.
    #82175

    thanks Nicolas

    I have attempted run myzigzag in ProOrder & backtest it – after modifying the indicator to remove the draw commands, it does run though the system is opening & closing on every bar.  Without loading the code on a public forum, what’s the best way to obtain some assistance to troubleshoot this? regards, Chris

Viewing 4 posts - 1 through 4 (of 4 total)

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