OPEN-SOURCE SCRIPT
Updated

The Pink Line

253
The Pink Line — Higher-Timeframe S/R With Breakout Confirmation

An overlay indicator that identifies key support and resistance levels derived from a higher timeframe and validates breakouts using candle structure and relative volume. Unlike standard pivot or S/R indicators that simply mark price extremes, The Pink Line adds three layers of confirmation before signaling a potential entry.

What Makes This Original

Most support/resistance tools plot static levels from pivot points or round numbers. The Pink Line takes a different approach:
  • ATR-based touch validation — Levels are only confirmed when price has touched them within a configurable ATR tolerance. A level that was never tested is not plotted.
  • Candle zone analysis — Entry signals require the breakout candle to close in the upper third (for longs) or lower third (for shorts) of its range, confirming strong directional commitment.
  • Relative volume confirmation — Breakouts must occur on above-average volume compared to the prior N bars, filtering out low-conviction moves.
  • Optional daily trend verification — An additional filter that checks whether the broader daily trend supports the breakout direction.


These four filters working together distinguish real breakouts from false ones.

How It Works

Resistance Level (Pink Line):
  • Calculated as the highest high over the last N bars on the selected higher timeframe (default: Daily)
  • Validated by counting how many times price touched the level within ATR tolerance
  • Only plotted when the minimum touch count is met


Support Level (Red Line):
  • Calculated as the lowest low over the last N bars on the higher timeframe
  • Same touch validation logic as resistance
  • Disabled by default — enable via settings


Setup Detection:
  • Fires on the first regular-session bar of the day when price opens within a configurable ATR distance of the confirmed level
  • Alerts the trader that a breakout attempt may be imminent


Entry Signal:
  • Close crosses above resistance (long) or below support (short)
  • Candle closes in the upper/lower zone of its range (configurable fraction, default top/bottom third)
  • Volume exceeds the average of the prior 14 bars
  • Optional: daily trend must confirm the direction


Usage

For breakout traders: Use the pink resistance line as your key level. When price opens near it at the start of the session (setup label), watch for a breakout candle that closes in the upper third of its range on above-average volume.

For reversal traders: The pink line also serves as a rejection level. If price touches the line but fails to break through with conviction, it can signal a short opportunity.

For credit spread traders: The confirmed levels provide natural strike selection reference points for bull put spreads (below support) or bear call spreads (above resistance).

Important Notes

The volume confirmation filter requires the asset to have native volume data. For indices like SPX that lack volume, consider disabling entry labels and using only the level lines for visual reference. This indicator does not repaint — all higher-timeframe data uses barmerge.lookahead_off and references completed bars only.


Default Parameters
  • Higher Timeframe: Daily
  • HTF Lookback: 5 bars | ATR Length: 14
  • Min Touches: 1 | Touch Tolerance: 0.10x ATR
  • Setup Distance: 0.20x ATR
  • Volume Average Length: 14
  • Candle Zone Fraction: 0.333 (top/bottom third)
  • Resistance (Pink): Enabled | Support (Red): Disabled
  • Setup Labels: Disabled | Entry Labels: Disabled
  • Daily Trend Verification: Disabled


Alerts
  • Possible Long Setup — session open near resistance
  • Possible Short Setup — session open near support
  • Long Entry Signal — confirmed breakout above resistance
  • Short Entry Signal — confirmed breakdown below support
Release Notes
The Pink Line — Higher-Timeframe S/R With Multi-Layer Breakout Confirmation - Updated

An overlay indicator that identifies key support and resistance levels derived from a higher timeframe and validates breakouts through a multi-layer confirmation system. Unlike standard pivot or S/R indicators that simply mark price extremes, The Pink Line requires four independent conditions to align before signaling a potential entry — significantly reducing false breakout signals.

What Makes This Original and Worth Using

Most S/R indicators stop at plotting a level. The Pink Line goes further by answering the question every trader faces at a key level: "Is this breakout real, or will it fail?"

It answers this by combining four independent filters that each address a different aspect of breakout quality. No single filter is sufficient — it is their convergence that creates the edge:

  • ATR-based touch validation — The level itself must be confirmed. A resistance or support level is only plotted if price has touched it within a configurable ATR tolerance during the lookback period. Untested levels are ignored. This ensures you are watching levels that the market has already recognized.
  • Candle zone analysis — The breakout candle must close in the upper third of its range (for longs) or lower third (for shorts). This filters out doji and indecision candles where price crossed the level but closed without conviction. A strong close in the extreme zone shows committed buyers or sellers.
  • Relative volume confirmation — The breakout must occur on above-average volume compared to the prior N bars. Volume validates participation — a breakout on thin volume is more likely to reverse. This filter eliminates low-conviction moves that lack institutional backing.
  • Optional daily trend verification — An additional macro filter that checks whether the broader daily trend supports the breakout direction. This prevents taking long breakouts in a daily downtrend or short breakdowns in a daily uptrend.


How the Components Work Together

Each filter addresses a different failure mode of breakout trading:
  • Touch validation ensures the level is meaningful (not random noise)
  • Candle zone analysis ensures the breakout has directional conviction
  • Volume confirmation ensures the breakout has participation
  • Trend verification ensures the macro context supports the direction


By requiring all conditions simultaneously, the indicator filters out the majority of false breakouts that plague simple S/R-based strategies. A signal only fires when the level is tested, the breakout candle is strong, volume confirms, and (optionally) the daily trend agrees.

How It Works

Step 1 — Level Identification (Higher Timeframe):
  • Resistance: The highest high over the last N bars on the selected higher timeframe (default: Daily, 5 bars)
  • Support: The lowest low over the same lookback
  • Both levels are calculated using request.security() with lookahead_off to prevent repainting


Step 2 — Level Validation (Touch Count):
  • The indicator counts how many bars touched the level within the ATR-based tolerance zone
  • Only levels meeting the minimum touch count are plotted
  • This confirms the market has tested and responded to the level


Step 3 — Setup Detection (Session Open):
  • On the first regular-session bar of the day, if price opens within a configurable ATR distance of the validated level, a "setup" alert fires
  • This gives the trader advance notice that a breakout attempt may develop during the session


Step 4 — Entry Signal (Breakout Confirmation):
  • Close crosses above resistance (long) or below support (short)
  • The breakout candle closes in the upper/lower zone of its range (default: top/bottom third)
  • Current bar volume exceeds the 14-bar average
  • Optional: daily trend must confirm the direction


Usage

For breakout traders: Use the pink resistance line as your key level. When price opens near it at the start of the session (setup label), watch for a breakout candle that closes in the upper third of its range on above-average volume. This is your high-conviction entry.

For reversal traders: The pink line also serves as a rejection level. If price touches the line but fails to produce a confirmed breakout candle, it signals that resistance is holding — a potential short opportunity.

For credit spread traders: The validated levels provide natural strike selection reference points. Sell put spreads below confirmed support or call spreads above confirmed resistance, with the multi-layer validation adding confidence that the level will hold.

Why This Indicator Adds Value

The core problem with S/R trading is false breakouts. Studies suggest 60-70% of breakout attempts fail. The Pink Line addresses this directly by requiring multiple independent confirmations before signaling an entry. Each filter eliminates a category of false signals: untested levels (touch validation), weak candles (zone analysis), thin volume (relative volume), and counter-trend moves (daily trend). The result is fewer but higher-quality signals that a trader can act on with greater confidence.


Important Notes

The volume confirmation filter requires the asset to have native volume data. For indices like SPX that lack volume, consider disabling entry labels and using only the level lines for visual reference. This indicator does not repaint — all higher-timeframe data uses barmerge.lookahead_off and references completed bars only.


To request access, send me a DM on TradingView with your username and the script name.

Default Parameters
  • Higher Timeframe: Daily
  • HTF Lookback: 5 bars | ATR Length: 14
  • Min Touches: 1 | Touch Tolerance: 0.10x ATR
  • Setup Distance: 0.20x ATR
  • Volume Average Length: 14
  • Candle Zone Fraction: 0.333 (top/bottom third)
  • Resistance (Pink): Enabled | Support (Red): Disabled
  • Setup Labels: Disabled | Entry Labels: Disabled
  • Daily Trend Verification: Disabled


Alerts
  • Possible Long Setup — session open near resistance
  • Possible Short Setup — session open near support
  • Long Entry Signal — confirmed breakout above resistance
  • Short Entry Signal — confirmed breakdown below support

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.