All indicators

Multi Supertrend with no-repaint HTF option strategy

May 30, 2021

Static chart image
Volume BasedSignalsMoving Averages

The Multi Supertrend with no-repaint HTF option strategy indicator provides a systematic approach to trend-following by combining multiple Supertrend calculations across different timeframes to generate entry and exit signals.

Usage

The strategy functions by looking for alignment between two Supertrend indicators: a primary one calculated on the current chart timeframe and an additional one calculated on a Higher Timeframe (HTF).

  • Trend Alignment: Long entries are triggered when both the current timeframe Supertrend and the HTF Supertrend signal an uptrend. Short entries occur when both indicators signal a downtrend.
  • Exit Conditions: The strategy closes positions when the trend alignment breaks—specifically, when the primary Supertrend flips its direction against the HTF trend.
  • VWAP Filtering: Users can enable a VWAP filter to ensure long entries only occur above the VWAP and short entries only occur below it, adding an extra layer of trend confirmation.
  • Visual Cues: The indicator provides bar coloring to reflect the combined trend state, helping traders identify the prevailing market direction at a glance.

Details

This strategy employs a "no-repaint" methodology for its Higher Timeframe data. It achieves this by using the request.security function with a specific offset (src[1]) and lookahead = barmerge.lookahead_on. This ensures that the HTF data used in calculations is already confirmed and available at the time of the bar close on the current timeframe, preventing the indicator from changing its historical signals as new data arrives from the higher timeframe.

The script also features an "Auto HTF" logic. When enabled, it automatically selects a logical higher timeframe based on your current chart interval (e.g., if you are on a 15-minute chart, it automatically targets the 1-hour timeframe for the second Supertrend).

Settings

  • Select HTF Automatically for Additional Supertrend: When enabled, the script chooses the HTF based on a predefined mapping related to the current chart timeframe.
  • Select Higher Timeframe for Additional Supertrend: Allows the user to manually select a specific timeframe for the second Supertrend if auto-selection is disabled.
  • Multiplier for Default Supertrend: Adjusts the sensitivity of the primary Supertrend's ATR multiplier.
  • Period for Default Supertrend: Sets the ATR period for the primary Supertrend calculation.
  • Multiplier for Additional Supertrend: Adjusts the ATR multiplier for the HTF Supertrend.
  • Period for Additional Supertrend: Sets the ATR period for the HTF Supertrend calculation.
  • Change Bar Color: Toggles the color-coding of price bars based on trend alignment.
  • VWAP Filter: When enabled, restricts trades based on price relative to the Volume Weighted Average Price.

FAQ

How do I access the Multi Supertrend with no-repaint HTF option strategy?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

What is the advantage of using the HTF option?

The Higher Timeframe option acts as a trend filter, ensuring that you are only taking trades on the lower timeframe that align with the broader market direction, which can help reduce false signals in sideways markets.

Does this strategy repaint?

No, the script is designed using a specific security call method that ensures HTF data is processed in a non-repainting manner, making the historical backtest results reliable.

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.