All indicators

CM_Modified_Heikin-Ashi_TrendBars

Jul 23, 2014

Static chart image
SignalsCandlestickMoving Averages

The CM_Modified_Heikin-Ashi_TrendBars indicator provides a trend-following visualization tool that applies smoothed Heikin-Ashi calculations and Exponential Moving Average (EMA) filters to color price bars based on market momentum.

Usage

The Usage section describes how the script can be used to identify trend shifts and maintain directional bias. Traders can use the bar coloring to filter out market noise, where green bars signify a bullish trend and red bars signify a bearish trend.

The indicator is highly adaptable to different trading styles:

  • Trend Identification: By looking at the bar color, users can determine the prevailing market sentiment. A change from red to green indicates a potential bullish reversal, while a change from green to red suggests a bearish reversal.
  • Asymmetric Smoothing: Users can set different EMA values for uptrends and downtrends. For example, a trader may want a more sensitive (lower value) filter for uptrends to capture breakouts quickly, while using a less sensitive (higher value) filter for downtrends to avoid premature exits during minor pullbacks.
  • Visual Filtering: By enabling the EMA plot, users can see the specific baseline used for trend calculations, allowing them to visualize the dynamic support and resistance levels created by the smoothed Heikin-Ashi data.

Details

The script functions by calculating modified Heikin-Ashi (HA) values. It specifically computes a Heikin-Ashi Close (the average of open, high, low, and close) and a Heikin-Ashi Open (the average of the previous HA open and HA close).

The trend detection logic involves two distinct Exponential Moving Averages:

  1. An UpTrend EMA calculated using the HA Close.
  2. A DownTrend EMA calculated using the HA Open.

The script then averages these two EMAs to create a central trend line. The trend state is determined by comparing the current HLC3 (Average of High, Low, and Close) to this averaged EMA value. If the price is above the average, the trend is considered bullish; if below, it is considered bearish. This dual-EMA approach provides a smoother transition between trend states compared to standard price-based moving averages.

Settings

  • EMA UpTrend: Sets the length of the EMA used for calculating the uptrend filter. Lower values increase sensitivity to price changes.
  • EMA DownTrend: Sets the length of the EMA used for calculating the downtrend filter. Higher values make the indicator less sensitive to volatility.
  • Show EMA Trend is Based On?: Toggles the visibility of the calculated EMA line on the chart.

FAQ

How do I interpret the bar colors?

Green bars indicate that the current price (HLC3) is above the smoothed Heikin-Ashi EMA average, representing a bullish trend. Red bars indicate the price is below the average, representing a bearish trend.

Why are there separate settings for UpTrend and DownTrend EMAs?

This allows traders to customize the sensitivity of the indicator based on market conditions. Markets often move with different velocities during upward and downward cycles; separate settings allow you to fine-tune the indicator to react faster to one direction than the other.

How can I access the CM_Modified_Heikin-Ashi_TrendBars 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.