cryptocashcashoo

Extrema Detector

cryptocashcashoo Updated   
Determines local maximums and minimums points in the chart.

Parameters:
  • lookback: number of candlesticks to look.
  • extrema_finder_sensivity: If lower, more extreme points will be found (may over-find).

Brief algorithm description:
Computes a Simple Moving Average (length=extrema_finder_sensivity), and searches for its local extremes.
Given some SMA extreme, it looks the previous extrema_finder_sensivity candlesticks to find the highest (or lowest value).

Notes:
Is a lagged indicator: determining if the current candlestick have reach a maximum can be delayed to, at most extrema_finder_sensivity-further candlesticks.

Release Notes:
Fix repaint.
- When a new candlestick is added, the previous plots are deleted (lookback line and min/max labels).
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.

Disclaimer

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?