2012issue C0765-70
Constructing a three-state Heikin-Ashi trend filter
A long-horizon Heikin-Ashi Trend filter is assembled as a three-state plot from Heikin-Ashi structure, a lag-reduced smoother, and a Moving average sell gate. Independent platform reconstructions isolate the same three construction knobs.
- The long-horizon Heikin-Ashi filter is a three-state plot: 100 for a long condition, 50 for a long exit or neutral state, and 0 for a short or negative state.
- Heikin-Ashi open and close are defined first, then a second-stage lag-reduced smoother is applied separately to Heikin-Ashi close and to the high-low midpoint.
- Up-state persistence combines consecutive Heikin-Ashi closes at or above Heikin-Ashi opens, raw-price strength versus Heikin-Ashi close, higher highs or lows, and the smoothed midpoint remaining at or above the smoothed Heikin-Ashi close. The down-state uses the inverse comparison set.
- A Moving average sell gate can force the filter out of the 50 state. Reconstructions expose three knobs: the triple-exponential length, the long-horizon average used for shorting or exiting, and the candle-size factor.
What the filter plots
The long-horizon Heikin-Ashi filter is constructed as a three-state plot: 100 for a long condition, 50 for a long exit or neutral state, and 0 for a short or negative state.
Editorial framing: the steps below separate Heikin-Ashi structure, the lag-reduced smoother, and the Moving average sell gate so each construction choice can be inspected on its own. That teaching order is editorial, not an archive claim.
HACOLT three-state filter on weekly EWW

The source pane locks TEMA length at 55, the shorting long-term average at 60, and the candle-size factor at 1.1. Transition months are read to the nearest month from the weekly screenshot; the indicator itself only prints the three discrete states.
Heikin-Ashi open and close
Heikin-Ashi open is built recursively as the midpoint of the prior Heikin-Ashi open and the current typical price.
Heikin-Ashi close averages that open with the max of high and that open, the min of low and that open, and typical price.
A second-stage lag-reduced smoother
The construction applies a second-stage lag-reduced smoother separately to Heikin-Ashi close and to the high-low midpoint.
The smoother has the form 2 times a triple exponential average minus a second triple exponential average of that result.
One published construction uses a 55-bar triple exponential smoother length.
Short candles and state persistence
A short-candle flag is defined when the absolute open-to-close range is smaller than the high-low range multiplied by the candle-size factor. One published construction uses a 1.1 candle-size factor to classify short candles.
Up-state persistence combines consecutive Heikin-Ashi closes at or above Heikin-Ashi opens, raw-price strength versus Heikin-Ashi close, higher highs or lows, and the smoothed midpoint remaining at or above the smoothed Heikin-Ashi close.
The down-state uses the inverse comparison set.
The Moving average sell gate
The long-term sell gate is an exponential moving average of close. One published construction uses a 60-bar exponential average of close as the long-term sell gate.
Once that gate is triggered, the Trend filter cannot remain in the 50 state and drops to 0 unless a new buy-state condition is present.
Three construction knobs
Independent platform reconstructions expose the same three construction knobs: the triple-exponential length, the long-horizon average used for shorting or exiting, and the candle-size factor.
All readings on this track · 16 readings
- 2004Reconstructing Heikin-Ashi bars from smoothed OHLC
- 2004Heikin-Ashi candle construction as an OHLC transform
- 2004Stacking heikin-ashi, swing charts, and a moving average in strong trends
- 2007Constructing a Heikin-Ashi volume-price oscillator
- 2007A volume-price oscillator is a timing trigger, not a standalone entry
- 2008Heikin-Ashi OHLC construction and simplification
- 2008How a Heikin-Ashi candlestick oscillator is built from color, lag, and hold rules
- 2008Heikin-Ashi color-coded candles and smoothed trend filters
- 2010Heikin-Ashi smoothed percent b for divergence timing
- 2011Constructing Heikin-Ashi, moving-average, and MACD filters
- 2011Constructing candlestick, Elliott-wave, and Heikin-Ashi hypotheses
- 2012Constructing a three-state Heikin-Ashi trend filter
- 2012Heikin-ashi as a trend-state signal without candlestick-patterns
- 2013Heikin-Ashi volume gates, smoothing, and denominator floors
- 2013How Heikin-Ashi close and typical-price form a two-average crossover
- 2013Walk-forward tests for color-coded Heikin-Ashi crosses