All indicators

Multi Supertrend with no-repaint HTF option

May 27, 2021

Static chart image
SignalsMoving Averages

The Multi Supertrend with no-repaint HTF option indicator provides a dual-layer trend filtering system that combines a standard Supertrend with an additional higher timeframe (HTF) version to identify high-confluence trend directions.

Usage

The indicator can be used to identify trend alignment across multiple timeframes. By combining a "Default Supertrend" (typically used on the current chart timeframe) with an "Additional Supertrend" (typically set to a higher timeframe), users can seek entries when both trends align.

  • Bullish Alignment: When both Supertrends are green, suggesting a strong uptrend.
  • Bearish Alignment: When both Supertrends are red, suggesting a strong downtrend.
  • Trend Filtering: Use the higher timeframe Supertrend as a master trend filter, only taking trades on the current timeframe that match the HTF direction.

Details

This tool utilizes a non-repainting method for fetching 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 data plotted for the higher timeframe is finalized and does not change after the bar closes, preventing the "repainting" issues common in multi-timeframe scripts.

The script also includes an "Auto HTF" logic that suggests an appropriate higher timeframe based on your current chart:

  • 1m -> 5m
  • 5m -> 15m
  • 1h -> 4h
  • Daily -> Weekly

Settings

  • Higher Timeframe for Default Supertrend: Allows the primary Supertrend to be calculated on a specific timeframe (default is current chart).
  • Multiplier for Default Supertrend: Adjusts the sensitivity of the first Supertrend; higher values result in fewer signals.
  • Period for Default Supertrend: The ATR period used for the first Supertrend calculation.
  • Multiplier for Additional Supertrend: Adjusts the sensitivity of the second (HTF) Supertrend.
  • Period for Additional Supertrend: The ATR period used for the second Supertrend calculation.
  • Select HTF Automatically for Additional Supertrend: When enabled, the script chooses the HTF based on your current chart interval.
  • Higher Timeframe for Additional Supertrend: Manually select the timeframe for the second Supertrend if the auto-selection is disabled.
  • Change Bar Color: Toggles the recoloring of price bars based on trend confluence.

FAQ

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

You can use it to find trend confluence; look for instances where both the fast and slow (HTF) Supertrends agree on direction to confirm a trade.

What makes this "no-repaint"?

It uses a specific security call method that requests the previous closed bar's data from the higher timeframe, ensuring that the values shown on the chart will not change once the bar is closed.

Where can I access this script?

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.