Supertrend/Moving Average Indicator
Oct 17, 2018

The Supertrend/Moving Average Indicator tool identifies trend direction and potential market entries by combining a volatility-based SuperTrend filter with a multi-layered moving average crossover system.
Usage
The Usage section focuses on how to interpret the various visual elements and signal triggers provided by the indicator.
- SuperTrend Direction: The primary trend is indicated by the SuperTrend line. A green line indicates a bullish trend, while a red line indicates a bearish trend. Arrows appear when the SuperTrend flips direction.
- Minor MA Crossover: The indicator plots two minor moving averages (Short and Long). A "Golden Cross" (Short crossing above Long) generates a small green triangle, while a "Death Cross" (Short crossing below Long) generates a small red triangle.
- Major MA Crossover: A third, "Major" moving average serves as a macro trend filter. When the average of the two minor MAs crosses the Major MA, larger triangle shapes are plotted to signify a potential significant trend shift.
- Buy/Sell Signals: Specific alerts and signals are triggered when a minor MA crossover occurs in alignment with price direction (e.g., a bullish cross with a higher close).
- Multi-Timeframe (MTF) Analysis: Users can set the MAs to calculate based on a fixed resolution (e.g., 1-hour MAs shown on a 15-minute chart) to maintain a higher-level perspective.
Details
The Supertrend/Moving Average Indicator is a refactored version of the original strategy by Zen_Quant, optimized for visual clarity and alert functionality.
The SuperTrend component utilizes the Average True Range (ATR) to calculate dynamic support and resistance levels. The Moving Average component is highly customizable, allowing users to choose from nine different calculation methods: SMA, EMA, WMA, VWMA, SMMA, DEMA, TEMA, HullMA, and LSMA.
A unique feature of this tool is the "Major MA" interaction. Instead of a standard price-versus-MA cross, the script calculates the average value of the two minor moving averages and detects when that average crosses the Major MA. This smoothing process helps filter out market noise during consolidation phases.
Settings
- SuperTrend Factor: The multiplier used to determine the distance of the SuperTrend line from the price.
- SuperTrend Period: The lookback period for the ATR calculation.
- Use Fixed Resolution (Minor/Major): Enables multi-timeframe analysis by locking the MA calculations to a specific timeframe.
- MA Type: Selects the mathematical model for the moving average (e.g., EMA, HullMA, LSMA).
- Source: The price data used for the MA calculation (default is Close).
- Length: The lookback period for each specific moving average.
- Offset: Shifts the moving average plot forward or backward in time.
- LSMA Offset: A specific setting for the Least Squares Moving Average variant.
FAQ
How do I access the Supertrend/Moving Average Indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Which moving average type is the most responsive? The HullMA and DEMA/TEMA variants are generally the most responsive to price changes, reducing lag compared to standard SMA or EMA inputs.
Can I set alerts for SuperTrend flips and MA crosses simultaneously? Yes, the script includes individual alert conditions for SuperTrend reversals, minor MA crossovers, and major trend shifts, which can be configured in the platform's alert menu.
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.