All indicators

Double Supertrend HTF Filter

Aug 23, 2023

Static chart image
Support and ResistanceDashboardVolatility

The Double Supertrend HTF Filter indicator provides a consolidated view of market trends by combining two Supertrend calculations from different higher timeframes into a single visual filter.

Usage

The primary use of this indicator is to act as a trend filter for your existing trading strategies. By monitoring two different higher timeframes (HTF), traders can ensure they are trading in alignment with the broader market sentiment.

The indicator features a horizontal alignment bar at the bottom of the chart:

  • Green Bar: Both higher timeframe Supertrends are in a bullish state. This signals a strong uptrend and allows for long positions.
  • Red Bar: Both higher timeframe Supertrends are in a bearish state. This signals a strong downtrend and allows for short positions.
  • Blue/Yellow Bar: The two Supertrends are in conflict (one bullish, one bearish). This indicates market indecision or a potential trend transition, suggesting caution or a neutral stance.

Traders can also choose to display the actual Supertrend lines on the chart to visualize the dynamic support and resistance levels provided by the higher timeframes.

Details

The Supertrend indicator, originally developed by Olivier Seban, utilizes the Average True Range (ATR) to account for market volatility while trailing price. This script extends that concept by fetching data from two user-defined timeframes using the request.security function.

By layering two distinct periods (e.g., 30m and 4h), the indicator filters out "noise" from lower timeframes. The default settings are optimized for lower timeframe scalping (1m to 15m), using the 30m and 4h timeframes to establish the directional bias.

Settings

Supertrend HTF 1 Settings

  • Plot Supertrend?: Toggles the visibility of the first higher timeframe Supertrend line on the main chart.
  • Higher Time Frame: Sets the timeframe for the first Supertrend calculation (e.g., "30" for 30 minutes).
  • ATR length: Determines the lookback period for the Average True Range calculation.
  • Factor: Sets the multiplier for the ATR to determine the distance of the Supertrend line from price.

Supertrend HTF 2 Settings

  • Plot Supertrend?: Toggles the visibility of the second higher timeframe Supertrend line on the main chart.
  • Higher Time Frame: Sets the timeframe for the second Supertrend calculation (e.g., "240" for 4 hours).
  • ATR length: The ATR period for the second higher timeframe.
  • Factor: The ATR multiplier for the second higher timeframe.

FAQ

How do I use the alignment bar?

The alignment bar at the bottom simplifies the data from two different timeframes. If it is green, both timeframes agree on a bullish trend. If red, both agree on a bearish trend.

Can I change the timeframes used?

Yes, you can customize both timeframes in the settings menu. Common pairs include 30m/4h for scalping or 4h/Daily for swing trading.

How do I access the Double Supertrend HTF Filter?

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.