Supertrend - Delayed Trail
Oct 25, 2020

The Supertrend - Delayed Trail indicator provides a modified version of the classic Supertrend tool designed to reduce premature stop-outs by implementing delay mechanisms in the trailing logic. This tool aims to help long-term trend traders stay in positions longer by offering more flexible and conditional stop-loss adjustments.
Usage
The Supertrend - Delayed Trail can be used as a primary trend-following tool or a dynamic trailing stop-loss. By delaying how quickly the stop level "tightens" behind price action, traders can avoid being stopped out during minor pullbacks before the primary trend resumes.
The indicator offers several delay modes:
- Bars: The trailing stop only moves after a specified number of bars have passed, preventing immediate adjustments.
- Steps: The stop level waits to adjust until price has reached an equivalent distance on the opposing side, creating a more staggered movement.
- Breakout: The stop logic responds based on volume-supported price breakouts, ensuring the trailing stop moves primarily when there is significant momentum.
Details
The script modifies the traditional Supertrend calculation by incorporating logic that prevents the stop line from updating every bar. This is achieved through user-defined conditions that determine when the "floor" (for longs) or "ceiling" (for shorts) is allowed to rise or fall.
A unique feature of this implementation is the Consider Wicks option. When enabled, the indicator uses the high and low of the candles to trigger a direction reversal rather than waiting for a close across the trailing stop line. This can lead to faster trend identification in volatile markets.
Settings
General Settings
- Source: Determines the price source used for calculations (e.g., Close, HL2).
- Consider Wicks: When checked, the script uses candle highs and lows for trend reversal logic instead of the close price.
- ATR Periods: The lookback period for the Average True Range used to calculate volatility.
- Stop Multiplier: The multiplier applied to the ATR to set the distance of the trailing stop.
- Target Multiplier: A secondary multiplier used to define target levels or transition states.
Delay Settings
- Delay Type: Choose between Disabled, Bars, Steps, or Breakout logic.
- Delay Bars: Specifies the number of bars to wait before the trailing stop is allowed to update (active when "Bars" is selected).
- Consider Wicks for Delay by Step: Applies wick-based logic specifically to the "Steps" delay calculation.
Breakout Settings
- Breakout volume MA Type/Length: Settings for the volume moving average used to confirm momentum.
- Breakout ATR Length/Multiplier: Parameters defining the volatility threshold required to trigger a "breakout" state.
- Breakout Volume/Target Markup: Percentage-based offsets to fine-tune breakout sensitivity.
FAQ
How do I interpret the colored candles? If the "Color Candles Based on Breakout" setting is enabled, candles will turn green or red based on volume-confirmed price breakouts, while neutral price action remains blue.
Can I use this for intraday trading? Yes, while designed to prevent early exits in long-term trends, the ATR-based nature of the script allows it to adapt to any timeframe, including intraday charts.
How 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.