All indicators

SuperTrend Heikin Ashi

Jan 10, 2025

Static chart image
SignalsCandlestickVolatility

The SuperTrend Heikin Ashi indicator provides a trend-following signaling mechanism that calculates the classic SuperTrend algorithm using Heikin Ashi candle values to filter market noise and reduce false signals.

Usage

The Usage section describes how the script can be used to identify market trends and potential entry points. By utilizing Heikin Ashi prices (Open, High, Low, and Close) instead of standard candle prices, the indicator smooths out price fluctuations, providing a clearer view of the prevailing trend.

  • Trend Identification: When the indicator line is green and positioned below the price, it signals a bullish trend. Conversely, when the line is red and positioned above the price, it signals a bearish trend.
  • Market Filter: Users can utilize this tool on major indices like SPY, SPX, or QQQ to gauge the overall market regime. For instance, traders might exercise caution or avoid long positions on individual stocks when the SuperTrend Heikin Ashi on a major index is red and the price is trading below the line.
  • Signal Generation: Crossovers between the price and the trailing stop line (mTsl) can be used as potential entry or exit triggers, often more stable than those derived from standard SuperTrend calculations.

Details

The script executes by requesting Heikin Ashi data for the current ticker using request.security. It then calculates the Average True Range (ATR) based on these Heikin Ashi values. The core logic involves determining a trailing stop line based on the median price (HL2) of the Heikin Ashi candles adjusted by a multiplier (Factor) of the ATR.

By basing the "Trend Up" and "Trend Down" logic on mClose (Heikin Ashi Close), the script exploits the smoothing characteristics of HA candles. This construction ensures that the trend changes only when the smoothed price effectively breaks the calculated volatility bands, rather than reacting to minor intraday spikes seen on standard charts.

Settings

  • Factor: The multiplier used to calculate the distance of the stop line from the price. Higher values make the indicator less sensitive to price changes, while lower values make it more responsive.
  • pd: The period used for the ATR calculation. This determines the lookback window for volatility measurement.

FAQ

How do I use the SuperTrend Heikin Ashi for filtering?

You can apply the indicator to benchmark indices to determine the broad market direction. If the indicator is red on a major index, it suggests a bearish environment where long positions may carry higher risk.

What is the advantage of using Heikin Ashi values?

Heikin Ashi values are calculated based on averages of the previous and current bars, which inherently filters out "noise." When applied to the SuperTrend, it helps prevent the indicator from flipping trend directions during minor, non-trending price corrections.

How can I access this tool?

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.