Pivot Trend Levels

You can use this indicator to detect the levels and trend.

I used the highest of the two last highest pivots and the lowest of the two last lowest pivots to calculate "max" and "min" or high level or low level.

I also calculate the average of the 4 values to reach the average line which could be a trend detector in higher lengths.

Default length is 3 but using 10 or 20 as length is really good as trending detector.

I need help to upgrade a trend detector system. please read the script for more information.

Thank you so much.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?