All indicators

Confirmed Supertrend Flags

Jan 5, 2026

Static chart image
SignalsMoving AveragesVolatility

The Confirmed Supertrend Flags indicator is a trend-following tool that enhances the classic Supertrend calculation by introducing a confirmation delay to filter out market noise and false breakouts.

Usage

The indicator can be used to identify trend direction and potential entry points with additional verification. When the price crosses the Supertrend level, the script does not immediately issue a signal; instead, it waits for a user-defined number of confirmation bars to ensure the new trend is sustained.

  • Bullish Signal: A "buy" flag appears below the bar once the price has closed above the Supertrend line and stayed in that direction for the specified confirmation period.
  • Bearish Signal: A "short" flag appears above the bar once the price has closed below the Supertrend line and remained there for the duration of the confirmation period.
  • Trend Tracking: The Supertrend stop line provides a dynamic level for visual trend tracking and can be used to inform stop-loss placement.

Details

The script utilizes a standard Average True Range (ATR) calculation to determine volatility-based bands. The Supertrend line is derived from these bands, flipping direction based on price closes relative to the trailing stop level.

The core innovation is the "Confirmation Bars" logic. By lagging the flip signal by a specific count of bars, the indicator reduces the impact of "whipsaws"—volatile periods where price briefly crosses the threshold before reversing. This makes it particularly effective for swing trading or trend-following systems that prioritize signal reliability over entry speed.

Settings

  • Source: Determines the price data used for the Supertrend calculation (default is HL2).
  • ATR Length: The lookback period for the Average True Range calculation.
  • ATR Multiplier: The factor applied to the ATR to determine the distance of the stop line from the price.
  • Confirmation Bars After Flip: The number of bars the price must remain on the new side of the Supertrend before a flag is plotted.
  • Show Supertrend Stop Line: Toggles the visibility of the underlying Supertrend line.
  • Stop Line Width: Adjusts the thickness of the Supertrend line.
  • Show Confirmed Flip Flags: Toggles the visibility of the buy/short flags.
  • Bullish (Buy) Color: Sets the color for bullish signals and the bullish stop line.
  • Bearish (Short) Color: Sets the color for bearish signals and the bearish stop line.
  • Flag Size: Provides options (Tiny, Small, Normal, Large) for the visual size of the signal flags.

FAQ

How do I use the confirmation bars setting?

Increasing the "Confirmation Bars" setting will result in fewer, more reliable signals but will increase the lag of the entry. Decreasing it to 0 will make the indicator behave like a standard Supertrend.

Can this be used for automated alerts?

Yes, the script includes alert conditions for both "Confirmed Buy" and "Confirmed Short" signals, which trigger only after the confirmation criteria are met.

How do I access Confirmed Supertrend Flags?

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.