OPEN-SOURCE SCRIPT

Peaks&Valleys

7 339
For Peaks:
marks bars whose high is higher than <input> bars on either side

For Valleys:
marks bars whose low is lower than <input> bars on either side

<input> defaults to 13

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.