Zig Zag Trend

Viewing 2 posts - 1 through 2 (of 2 total)
  • #32117

    Hello everyone

    Newbie to the forum here so I hope I am posting in the right place. There is an old indicator in the library called ZigZag Trend that is of interest to me

    https://www.prorealcode.com/prorealtime-indicators/zigzag-trend/

    It is supposed to return +1 for an up trend in the zigzag indicator or -1 for a downtrend. I cannot get it to work on PRT 10.3 – it just returns zero all the time. Can anyone help me by getting it to work or write something similar that does work on 10.3. The image with the listing is a little confusing as it shows the indicator returning zero for a lot of the time where I would have thought it should be +1 or -1 all the time with no zero. I also fully understand that zigzag indicators repaint but what I am looking for is an indicator that returns a value positive or negative that indicates whether at that moment in time (close of candle) the zigzag set at say 1% is trending up or down. This value would be interesting to try out in various strategies I am considering.

    Thanks for any help

     

    #32423

    This is the answer I made about your question in the library:

    You need to change the ‘amnt’ variable to a percentage, so if you set it to 10 it represents a 10% needed for a new zigzag to be found, which is quite enormous for many instruments / timeframe.

    So you must lower this value to a valid percentage, 3% for a daily timeframe analysis is acceptable.

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

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