HeikenAshi Trend
TraderPro Trader

HeikenAshi Trend

The HeikenAshi Trend indicator displays smoothed Heikin-Ashi candles as a trend overlay with optional multi-timeframe layers. By applying double EMA smoothing to Heikin-Ashi calculations, it filters out market noise to reveal the underlying trend direction with clarity.

Standard Heikin-Ashi candles already smooth price data by averaging, but they can still produce whipsaws in choppy markets. This indicator adds two layers of exponential smoothing—first on the raw OHLC data, then on the resulting HA values—creating a clean trend ribbon that changes color only on meaningful trend shifts.


USAGE

Reading the Trend Ribbon

The indicator draws a filled "ribbon" representing the smoothed Heikin-Ashi candle body.

  • Bullish (Blue): Smoothed HA close is above the smoothed HA open.
  • Bearish (Magenta): Smoothed HA close is below the smoothed HA open.
  • The body fill uses a semi-transparent color, while the wick range is filled with a lighter shade, creating a layered visual effect. Color changes represent confirmed trend shifts after the double smoothing has absorbed enough price data, eliminating most false signals.

    Multi-Timeframe Overlays

    Two higher timeframe overlays are available: 15-minute and 1-hour. When enabled, each draws its own smoothed HA ribbon on the chart.

    For example, on a 1-minute chart:

  • Current TF Ribbon: Shows micro-trend direction.
  • 15-minute Overlay: Shows short-term trend.
  • 1-hour Overlay: Shows the dominant trend.
  • When all three agree, the setup carries higher conviction. Each MTF overlay includes its own smoothing parameter to control how quickly higher timeframe data adapts to the lower timeframe chart.

    Optional Raw Candles

    A Show Candles toggle displays the actual smoothed HA candle bodies and wicks alongside the ribbon fills for traders who prefer a traditional candlestick format.


    DETAILS

    Double Smoothing Process

    The calculation follows a three-step pipeline:

  • EMA Smoothing of OHLC: Raw open, high, low, and close values are each smoothed with an EMA of configurable length.
  • Heikin-Ashi Transformation: The smoothed OHLC values are converted into Heikin-Ashi format:
  • $HA_{Close} = \frac{O+H+L+C}{4}$
  • $HA_{Open} = \text{recursive average of prior HA Open and HA Close}$
  • Second EMA Smoothing: The resulting HA values are smoothed again with a second EMA pass, producing the final values.
  • This approach significantly reduces lag compared to using very long single-pass smoothing while achieving comparable noise reduction.

    Multi-Timeframe Data

    Higher timeframe HA values are fetched using request.security() and then optionally smoothed with an additional EMA on the current timeframe. This prevents the "staircase" effect common with raw MTF data.


    SETTINGS

    Main Settings

  • EMA Length: Period for the first EMA smoothing pass (default: 10).
  • Smoothing Length: Period for the second EMA pass on HA values (default: 10).
  • Bullish / Bearish Color: Customizable trend colors.
  • Multi-Timeframe

  • Show 15min Bars: Enable the 15-minute smoothed HA overlay.
  • Show 1hr Bars: Enable the 1-hour smoothed HA overlay.
  • MTF Transparency: Controls the opacity of MTF overlays.
  • 15min / 1hr Smoothing: Additional smoothing applied to each MTF layer.
  • Show Candles: Display traditional candle bodies alongside the ribbon.

  • METHODOLOGY

    This indicator employs a proprietary double-smoothing pipeline that applies two independent EMA passes to Heikin-Ashi transformed data. The multi-timeframe integration uses proprietary adaptive smoothing parameters per MTF layer to control visual transition between higher timeframe candle updates. The ribbon fill system uses proprietary transparency and layering logic for body versus wick visualization. Source code protection preserves the integrity of these proprietary smoothing and visualization calculations.

    đź’ˇ
    Disclaimer: This indicator is a trend-visualization tool using smoothed Heikin-Ashi calculations. Heikin-Ashi values are synthetic and do not represent actual traded prices. It does not constitute financial advice and past performance does not guarantee future results.