OPEN-SOURCE SCRIPT
Updated Structural Trendlines

Automatically detects structural trendlines anchored at confirmed pivot highs (Lower Highs) and pivot lows (Higher Lows), drawing only lines the market
has genuinely respected — every bar between the anchor and touch pivot must stay clean, with no wick violations beyond tolerance. Steep, parabolic lines
are filtered out using rolling angle normalization, and anchors expire after a configurable number of bars so the indicator never draws from forgotten
history. A signal fires only when price closes beyond the projected line — not a wick — eliminating false breakouts from intraday noise. Stop-loss is
automatically set to the low of the break candle (bullish) or the high (bearish).
has genuinely respected — every bar between the anchor and touch pivot must stay clean, with no wick violations beyond tolerance. Steep, parabolic lines
are filtered out using rolling angle normalization, and anchors expire after a configurable number of bars so the indicator never draws from forgotten
history. A signal fires only when price closes beyond the projected line — not a wick — eliminating false breakouts from intraday noise. Stop-loss is
automatically set to the low of the break candle (bullish) or the high (bearish).
Release Notes
update default valuesOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.