All indicators

SuperTrend Indicator

Aug 16, 2021

Static chart image
SignalsMoving AveragesVolatility

The SuperTrend Indicator tool provides a structured approach to trend-following by identifying specific candle interactions with the SuperTrend line and filtering entries using momentum and volatility. It aims to capture trend continuations by signaling entries when price action resets against the trend line before resuming its primary direction.

Usage

The indicator identifies "SuperTrend Candles" which are used as the foundation for entry signals.

Long Entries A bullish setup occurs when a candle's low is below the SuperTrend line (or within the ATR buffer) but closes above it while the overall SuperTrend direction is positive. A long signal is triggered if the high of the current or subsequent candles (based on the Offset setting) exceeds the high of this specific bullish setup candle.

Short Entries A bearish setup occurs when a candle's high is above the SuperTrend line (or within the ATR buffer) but closes below it while the overall SuperTrend direction is negative. A short signal is triggered if the low of the current or subsequent candles exceeds the low of the bearish setup candle.

Exit Logic Exits are managed through three primary criteria:

  1. Stop Loss: Triggered if the price closes beyond the setup candle's low (for longs) or high (for shorts).
  2. Trend Flip: Triggered if the SuperTrend direction reverses.
  3. Take Profit: Triggered if the user-defined Reward to Risk ratio is reached.

Details

The script enhances the standard SuperTrend calculation by introducing an "ATR Buffer." When enabled, the script considers candles that might not strictly touch the SuperTrend line but fall within a specific volatility-adjusted range. This helps account for minor slippage or "near-misses" in fast-moving markets. Furthermore, the RSI filter adds a momentum layer, ensuring that long entries only occur when the RSI is above its Weighted Moving Average (WMA) and short entries when it is below.

Settings

SuperTrend & Volatility

  • ATR Length: The lookback period for the SuperTrend ATR calculation.
  • Factor: The multiplier applied to the ATR for the SuperTrend calculation.
  • Consider ATR: Enables a buffer zone around the SuperTrend line for entry identification.
  • ATR Buffer from ST (Divide ATR by): Adjusts the width of the buffer zone relative to the current ATR.
  • ATR period: The lookback for the secondary ATR used for the buffer calculation.

Filters & Strategy

  • RSI Length: Lookback period for the RSI momentum filter.
  • WMA Length: Lookback period for the RSI's moving average.
  • Consider RSI and WMA: Toggles the momentum filter for entry signals.
  • Enter Criteria Offset: Determines how many candles after the setup candle to monitor for a breakout (1 or 2).
  • Reward to Risk Ratio: Sets the target profit level based on the initial distance to the stop loss.

FAQ

How do I use the ATR Buffer?

The ATR Buffer allows the indicator to recognize setup candles that are near the SuperTrend line even if they don't perfectly touch it. Lowering the "Divide ATR by" value makes the buffer larger, potentially increasing the number of signals.

What does the Offset setting do?

The Offset determines the window of opportunity to enter after a setup candle is detected. If set to 2, the script will look at the two subsequent candles to see if they break the setup candle's high or low.

How can I access this indicator?

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.