OPEN-SOURCE SCRIPT

Pivot Trendlines with Breaks and Zones [HG] - profitgang

422
This script builds on HoanGhetti's Pivot Trendlines with Breaks concept and their
SimpleTrendlines library (HoanGhetti/SimpleTrendlines/4).

Credit: Original trendline/pivot-break logic and library © HoanGhetti.

What this version adds:
- Dynamic support/resistance zones (shaded boxes) around each trendline
- Live-updating price labels on trendlines
- Extended horizontal S/R lines with price tags
- Configurable zone width and extension length

HOW IT WORKS
The script detects swing pivots using a configurable lookback length, then draws a trendline connecting each new pivot low (support) to the previous one, and each new pivot high (resistance) to the previous one. When price closes through one of these trendlines, it's flagged as a breakout and the line locks in place at the break point. On top of that base logic, this version tracks the live trendline price and continuously redraws a shaded zone around it (width set as a % of price) so you get a visual buffer instead of a single hairline level. Price labels update on every bar to show the exact numeric support/resistance value, and optional extended horizontal lines project the most recent pivot level forward so you can see it well ahead of current price.
HOW TO USE IT
Use the support/resistance zones as areas to watch for reaction, rejection, or a breakout rather than exact levels — the zone width gives you room for wicks and noise instead of expecting price to respect a single price point. On lower timeframes (1-5 min), tighten the zone width and pivot length for faster, more reactive levels; on higher timeframes, widen both for cleaner, less noisy structure. A break of the trendline with the "Br" label suggests the prior support/resistance has failed and price may continue in that direction — combine it with volume or your own confirmation signal before entering, since trendline breaks alone can be prone to false signals in choppy conditions.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.