SuperTrended Moving Averages Strategy
Oct 3, 2025

The SuperTrended Moving Averages Strategy indicator identifies trend reversals by combining various moving average types with an ATR-based volatility band to generate actionable buy and sell signals.
Usage
The Usage section describes how the script can be used, examples should be provided in this section. This strategy is designed to capture trend shifts by monitoring the relationship between price action and a trailing volatility floor/ceiling. When the price crosses above the upper band, a bullish trend is confirmed; conversely, when the price drops below the lower band, a bearish trend is initiated.
Users can apply this tool to various timeframes, including lower intervals like the 1-second chart, to scalp quick price movements or higher timeframes for swing trading. The script includes built-in strategy execution logic, allowing users to backtest performance with automated entry and exit labels.
Details
The script functions by calculating a baseline moving average and then offsetting it by a multiple of the Average True Range (ATR). It features 11 different moving average types:
- Standard: SMA, EMA, WMA, TMA.
- Advanced/Low Lag: DEMA, ZLEMA, HMA (Hull), TSF (Time Series Forecast).
- Specialized: VAR (Variable Index Dynamic Average), WWMA (Welles Wilder Moving Average), and TILL (Tillson T3).
The "SuperTrended" logic ensures that the bands are trailing; the bullish support level can only move upward, and the bearish resistance level can only move downward until a crossover occurs. This prevents the signal from flickering during minor retracements.
Settings
- Source: Determines the price data used for calculations (default is Close).
- Moving Average Type: Selects the smoothing algorithm (e.g., EMA, HMA, ZLEMA).
- Moving Average Length: Sets the lookback period for the chosen moving average.
- ATR Period: Sets the lookback period for volatility calculation.
- ATR Multiplier: Adjusts the distance of the bands from the moving average.
- Change ATR Calculation Method: Toggles between the modern ATR formula and a simple moving average of the True Range.
- Show Buy/Sell Signals: Toggles the visibility of labels on the chart.
- Highlighter On/Off: Enables or disables the background color filling between price and the bands.
- Stop Loss % / Take Profit %: Defines the risk management parameters for the automated strategy execution.
FAQ
How do I interpret the buy and sell signals? A "Buy" signal is generated when the price closes above the trailing resistance band (Down Trend line), while a "Sell" signal occurs when the price closes below the trailing support band (Up Trend line).
Can I use this for automated trading?
Yes, the script uses the strategy() function, which allows for backtesting and can be connected to automated execution engines via alerts.
How do I access the SuperTrended Moving Averages Strategy? 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.