understanding the zigzag indicator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #81879 quote
    chris
    Participant
    Junior

    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 quote
    Vonasi
    Moderator
    Master

    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. 🙂

    chris thanked this post
    #81913 quote
    Nicolas
    Keymaster
    Master

    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.

    chris thanked this post
    #82175 quote
    chris
    Participant
    Junior

    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)
  • You must be logged in to reply to this topic.

understanding the zigzag indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
chris @oceanchris Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by chris
7 years, 4 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/04/2018
Status: Active
Attachments: No files
Logo Logo
Loading...