All indicators

Breaks and Retests with Volatility Stop [HG]

Oct 4, 2023

Static chart image
Support and ResistanceSignalsMoving AveragesVolatilityRepainting Functionality

The Breaks and Retests with Volatility Stop [HG] indicator is a comprehensive technical analysis tool designed to identify key support and resistance levels, breakout events, and subsequent retests while incorporating trend-following risk management. It helps traders distinguish between initial structural breaks and the validation of those levels through retest price action.

Usage

The indicator can be used to visualize market structure and identify high-probability entry or exit zones.

  • Breakouts: When price closes beyond a detected support or resistance box, a "Break" label is generated. This signals a potential shift in market structure.
  • Retests: After a breakout, the indicator monitors for a "Potential Retest" where price returns to the broken level. If price interacts with the level and holds within the user-defined "Retest Detection Limiter" window, a confirmed "Retest" label appears.
  • Volatility Stop: This component acts as a dynamic trend filter and potential trailing stop-loss. When the crosses are green, the trend is considered bullish; when red, the trend is bearish. Traders can use this to confirm the direction of a breakout.
  • Moving Averages: Two integrated SMAs provide additional trend context and can act as secondary dynamic support or resistance.

Details

The script utilizes pivot high and low logic to construct support and resistance boxes. These boxes are dynamic and can be configured to handle repainting in three ways:

  1. On: Levels update in real-time.
  2. Off (Candle Confirmation): Levels and alerts trigger only after a candle closes.
  3. Off (High & Low): Uses the extreme values of the candle to confirm breaks, providing a non-repainting alternative that reacts to price spikes.

The retest logic includes a specific "Limiter" to ensure that retest signals are only valid if they occur within a reasonable timeframe following the initial breakout, preventing late and inaccurate signals.

Settings

Support and Resistance

  • Lookback Range: Defines the number of bars used to identify pivot points for support and resistance levels.
  • Bars Since Breakout: Sets the minimum distance required after a breakout before a retest can be detected.
  • Retest Detection Limiter: The maximum number of bars allowed to confirm a retest after a potential retest is detected.
  • MA 1/2 Length & Color: Adjusts the periods and visual style of the two integrated Simple Moving Averages.

Conditions

  • Breakouts/Retests: Toggle switches to show or hide specific price action labels.
  • Repainting: Selection between "On", "Off: Candle Confirmation", and "Off: High & Low" to control how the script handles real-time data.

Styling

  • Outline/Extend: Customizes the visual boundaries and horizontal extension of the support/resistance boxes.
  • Label Type/Size: Switches between "Full" labels (e.g., "Potential Retest") and "Simple" labels (e.g., "P. Re"), and adjusts their scale.
  • Colors: Individual color pickers for support, resistance, and text overrides.

Volatility Stop

  • Volatility Stop Length: The period used for the ATR calculation within the stop logic.
  • Volatility Stop Multiplier: The factor applied to the ATR to determine the distance of the stop from price.

FAQ

How do I interpret a "Potential Retest" label? A "Potential Retest" indicates that price has returned to a previously broken support or resistance zone. It is a warning that a validation of the level is currently being attempted.

What is the "Retest Detection Limiter" for? This setting prevents the indicator from flagging a retest that happens too long after the initial breakout, ensuring that the structural relevance of the level is still fresh.

How can I access Breaks and Retests with Volatility Stop [HG]? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.