PROTECTED SOURCE SCRIPT
Swings P1 / P2 / P3

Swing detection via ta.pivothigh/ta.pivotlow (len/len), so labels appear after pivot confirmation (len bars). P2 = swing high, P3 = swing low, P1 marks the prior pivot at trend transition (HH/HL → up, LL/LH → down). Optional ATR minimum leg-length filter.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
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.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
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.