OPEN-SOURCE SCRIPT

Elaris Failed Breakout Detector

1 540
Failed Breakout Detector [Elaris]

The **Failed Breakout Detector** is designed to help traders identify situations where price briefly breaks above resistance or below support, but fails to sustain the move and quickly returns back inside the previous trading range.

These events are commonly referred to as **failed breakouts**, **bull traps**, **bear traps**, or **liquidity sweeps**. They can indicate that buying or selling pressure was unable to maintain the breakout, potentially leading to a move in the opposite direction.

Instead of relying on a single candle pattern, this indicator combines multiple confirmation techniques to improve signal quality, including:

• Automatic support and resistance detection using confirmed swing pivots.
• Configurable breakout buffer to reduce sensitivity to minor price movements.
• Detection of failed breakout and failed breakdown events within a user-defined number of bars.
• Optional volume confirmation to require stronger participation during the initial breakout.
• Optional rejection wick analysis to identify stronger rejection candles.
• Optional EMA trend filter for users who prefer trading with the prevailing trend.
• Dynamic support and resistance zones based on ATR.
• Signal confidence score for additional context.
• Optional dashboard displaying current structure and trend information.
• Built-in alert conditions for long, short and combined signals.

How it works

**Failed Breakout (Short Setup)**

1. Price closes above a confirmed resistance level.
2. Within the specified number of candles, price closes back below that resistance.
3. Optional filters such as volume, wick rejection and trend confirmation are evaluated.
4. A bearish failed breakout signal is generated.

**Failed Breakdown (Long Setup)**

1. Price closes below a confirmed support level.
2. Price quickly closes back above that support.
3. Optional confirmation filters are applied.
4. A bullish failed breakdown signal is generated.

Inputs

The indicator allows users to customize:

• Pivot sensitivity
• ATR-based breakout buffer
• Support and resistance zone size
• Maximum number of bars allowed before the breakout is considered valid
• Volume confirmation
• Rejection wick requirements
• EMA trend filtering
• Dashboard visibility
• Signal labels
• Alert conditions

Notes

• Swing levels are created from confirmed pivot highs and lows. Because pivots require confirmation, support and resistance levels are confirmed after the selected right-side pivot bars.
• Signal markers themselves do not repaint after they appear.
• This indicator is intended as a technical analysis tool and should be used alongside sound risk management and additional market context.
• No indicator can guarantee future market direction.

If you find this indicator useful, consider leaving a like and sharing your feedback. Constructive suggestions are always appreciated and help improve future updates.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.