2013issue C1020-25
Walk-forward tests for color-coded Heikin-Ashi crosses
Candle color can publish a long or short state when a faster typical-price average crosses a slower heikin-ashi average and that bar’s body polarity agrees. This lesson freezes those lengths on an earlier sample, reads the same paint on a later calendar, and keeps a bollinger-bands envelope as the quantitative baseline that can stand down some of the colors.
- A candle-color overlay can encode a long state on one color change and an exit or short state on the opposite change, while filled and unfilled bodies still record whether the bar closed above or below its open.
- Color may flip only when the typical-price average crosses the heikin-ashi average and the same bar meets the polarity-lock. Otherwise the held-state rule keeps the previous long or short color.
- Walk-forward analysis searches candidate lengths on an earlier sample, freezes them, and then applies the same color rules to a later window.
- The painted expert is confirmation only. A bollinger-bands envelope from the same swing-rule stack remains in place to stand down some of the colors it proposes.
Candle color as a state claim
A candle-color overlay can encode a long state on one color change and an exit or short state on the opposite color change. Filled versus unfilled bodies still record whether that bar closed above or below its open.
Editorial reading: treat that paint as a published regime claim, not as decoration.
Simple average-cross rules are described as workable mainly when prices trend and as prone to unhelpful flips otherwise. Extra conditions are added before a cross is allowed to change state.
A slower heikin-ashi rail and a faster typical-price rail
Heikin-ashi is a recalculated open-high-low-close transform whose derived close becomes the slower, smoother rail of the dual-average color state. That close is presented as the stronger smoother and is generally one bar later than the raw close.
The fast series is typical price, defined as the mean of high, low, and close, and then exponentially averaged. Default construction applies an eight-bar exponential average to the heikin-ashi close and a five-bar exponential average to typical price.
Color state flips only when the typical-price average crosses the heikin-ashi average and the same bar’s close-versus-open polarity agrees. The polarity-lock requires that the bar’s close sit on the same side of its open as the intended new state. If that joint test fails, the held-state rule keeps the previous long or short color.
Freeze the lengths, then read the later calendar
Average lengths are not treated as universal. A strategy wrapper is used so candidate heikin-ashi and typical-price lengths, plus stop and breakeven inputs, can be searched on historical bars.
Walk-forward analysis fits those lengths and protective stops on an earlier sample, freezes them, and then reads the same color rules on a later sample. An in-sample search from January 2005 through January 2010 is used to freeze lengths. The same frozen rules are then applied to a later window from January 2010 through January 2013.
Equal six-bar lengths were discarded because the two averages would travel together and could generate extra later crosses. A six-and-four pair was retained as nearer the visual eight-and-five default.
Stops locked after the rails
After lengths were frozen, emergency stop and breakeven were searched separately, with chart fit preferred over extreme optimizer scores. A 9 percent stop with a 10 percent breakeven was locked before the later-window run.
Editorial reading: keep the volatility-band envelope in the same lesson so the out-of-sample colors are judged against that explicit quantitative baseline rather than trusted on sight.
Walk-forward average win versus loss on CIEN

Heikin-ashi length 6 and typical-price length 4 were frozen from the 2005–2010 search; the walk-forward then used a 9 percent emergency stop, a 10 percent breakeven, and 100-share size.
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