All indicators

Double Supertrend

Dec 1, 2021

Static chart image
SignalsMoving AveragesVolatility

The Double Supertrend indicator aims to reduce market noise and filter false signals by utilizing two synchronized Supertrend calculations with different sensitivity factors. This tool provides a comprehensive framework for trend following, offering automated entry and exit signals alongside multiple profit-taking methodologies.

Usage

The Usage section describes how the script can be used in live or backtesting environments. Long signals are identified by green arrows with "Long" text, while short signals are identified by red arrows with "Short" text. For optimal results, users should wait for the candle to close to validate the signal.

The script includes several functional components:

  • Primary Entries: Triggered when both the Fast and Slow Supertrend components align in the same direction.
  • Add Positions: Small "L" or "S" cross shapes indicate opportunities to increase position size (pyramiding) when the price tests the Fast Supertrend level without breaking the trend.
  • Exit Strategies: Users can toggle between four distinct exit types to manage risk and lock in profits.

Details

The core logic relies on two Supertrend indicators. The "Fast" deviation acts as the leading indicator for reactive signals, while the "Slow" deviation provides trend confirmation to ensure the user is not entering against the broader market momentum.

The script also features specialized exit logic:

  • Reversals: Calculates exits based on the price range (highest high and lowest low) over a specific lookback period.
  • ATR: Projects a fixed take-profit level based on Average True Range at the time of entry.
  • Supertrend Mirroring: For "Fast" or "Slow" options, the script mirrors the distance between the price and the respective Supertrend line to create a dynamic profit target.

Settings

Technical Analysis

  • Show Indicators: Toggles the visibility of the Supertrend lines and background fills on the chart.
  • Length: The lookback period for the ATR calculation used by the Supertrends.
  • Dev Fast: The multiplier for the leading (faster) Supertrend component.
  • Dev Slow: The multiplier for the confirmation (slower) Supertrend component.
  • Exit Type: Selects the logic for profit targets: Reversals, ATR, Fast Supertrend, or Slow Supertrend.
  • Period: Defines the lookback for the Reversals exit type and gradient calculations.
  • Multiplier: The ATR multiplier used specifically when the ATR exit type is active.

Strategy

  • Use The Strategy: Enables the backtesting engine to calculate performance metrics.
  • Show/Use Entries: Filters whether Long or Short entries are active.
  • Show/Use Exits: Enables or disables the specific exit signals calculated by the script.
  • Show/Use Add Long/Short: Enables the pyramiding logic for adding to existing positions.
  • Trades Date Start/End: Sets the historical window for backtesting calculations.

FAQ

How do I determine the best settings for a specific asset? You can use the built-in strategy engine. Enable "Use The Strategy," open the Strategy Tester panel, and adjust the Dev and Length parameters until you find a configuration that yields positive net profit with an acceptable drawdown for your risk profile.

What is the recommended stop loss for this script? While not explicitly plotted as a line, common practices include using the Fast Supertrend line as a trailing stop, or placing a hard stop at the entry candle's high/low.

How can I access the Double Supertrend? 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.