Candlestick

Heikin Ashi Signals: Synthetic Candles and Real Execution Prices

Inspect Heikin Ashi color runs, wick geometry and small bodies with a Pine Script example. Keep synthetic candle signals separate from executable market prices.

Heikin Ashi Signal Interpretation

Quick-reference guide to 5 signal types you will see on the chart.

Signal TypeIndicator ConditionMarket MeaningInterpretation limits
Two bullish no-lower-wick candlesTwo consecutive HA closes exceed their HA opens, with no lower wick within toleranceA pattern in averaged candles.Does not establish that buyers absorbed every sell order.
Two bearish no-upper-wick candlesTwo consecutive bearish HA bodies with no upper wick within toleranceThe opposite synthetic-candle pattern.Not evidence of every intrabar order or a guaranteed decline.
Small body after two same-color candlesCurrent HA body/range is below a configured threshold after two bullish or bearish bodiesA change in the averaged candle geometry.No reversal probability or imminent exhaustion is established.
Three bullish no-lower-wick candlesThree consecutive candles meet that HA definitionPersistence of the defined synthetic pattern.Not automatically the traditional three-white-soldiers pattern.
Three bearish no-upper-wick candlesThree consecutive candles meet the opposite HA definitionA corresponding persistence condition.No expected price move, return or reliability score is claimed.

Heikin Ashi Pine Script Signal Code

Educational indicator example. Review its exact rules and compare its plots with your intended calculation in TradingView. It does not place orders or establish profitability.

Pine Script v6
//@version=6
indicator("Heikin Ashi Pattern Examples", overlay=true)
bodyLimit = input.float(0.15, "Small Body Ratio", minval=0.01, maxval=1)
haTicker = ticker.heikinashi(ticker.standard(syminfo.tickerid))
[haOpen, haHigh, haLow, haClose] = request.security(haTicker, timeframe.period, [open, high, low, close], gaps=barmerge.gaps_on, lookahead=barmerge.lookahead_off)
bull = haClose > haOpen
bear = haClose < haOpen
tolerance = syminfo.mintick * 0.01
noLower = math.min(haOpen, haClose) - haLow <= tolerance
noUpper = haHigh - math.max(haOpen, haClose) <= tolerance
body = math.abs(haClose - haOpen)
rangeSize = haHigh - haLow
smallBody = rangeSize > 0 and body / rangeSize < bodyLimit
bullPair = barstate.isconfirmed and bull and noLower and bull[1] and noLower[1]
bearPair = barstate.isconfirmed and bear and noUpper and bear[1] and noUpper[1]
bullThree = bullPair and bull[2] and noLower[2]
bearThree = bearPair and bear[2] and noUpper[2]
smallAfterRun = barstate.isconfirmed and smallBody and ((bull[1] and bull[2]) or (bear[1] and bear[2]))
plotcandle(haOpen, haHigh, haLow, haClose, "Synthetic HA candles", color=bull ? color.new(color.green, 45) : color.new(color.red, 45))
plotshape(bullPair, "Bullish pair", shape.triangleup, location.belowbar, color=color.green, size=size.small)
plotshape(bearPair, "Bearish pair", shape.triangledown, location.abovebar, color=color.red, size=size.small)
plotshape(smallAfterRun, "Small body after run", shape.diamond, location.abovebar, color=color.yellow, size=size.tiny)
alertcondition(bullPair, "HA bullish pair", "Two completed bullish HA candles without lower wicks under the example tolerance")
alertcondition(bearPair, "HA bearish pair", "Two completed bearish HA candles without upper wicks under the example tolerance")
alertcondition(bullThree, "HA three bullish candles", "Three completed bullish no-lower-wick HA candles")
alertcondition(bearThree, "HA three bearish candles", "Three completed bearish no-upper-wick HA candles")
alertcondition(smallAfterRun, "HA small body after run", "Small HA body after two same-color candles; no reversal guarantee")

Example settings for Heikin Ashi

Record the inputs used by the example. These settings are not an optimized trading recommendation.

Feature comparison table: Default vs Description
ParameterDefaultDescription
Small Body Ratio0.15, exampleA body smaller than 15% of its synthetic range meets this definition. Zero-range bars are excluded.
Data sourceTradingView Heikin Ashi tickerUses the documented ticker.heikinashi request. It does not incorrectly calculate HA open from only the previous ordinary candle.
Wick tolerance0.01 minimum tickNumerical equality allowance, not a tradeable minimum price increment or an optimized pattern tolerance.
Chart contextStandard time-based candlesRun the example on standard bars and compare synthetic overlay values separately. No additional smoothing input is supplied or claimed.

Turn the condition into an explicit rule

Specify the calculation, confirmation time, entry and exit rules before asking Pineify to draft or revise Pine Script. Review the code and simulate realistic costs before evaluating a strategy.

Explore Pine Script coding

Related Resources

Heikin Ashi Pine Script ReferenceTradingView alert setup documentation

FAQ

Heikin Ashi Signals FAQ

What is wrong with using the prior regular candle for HA open?
The recursive HA open depends on the previous HA open and close. Replacing those with the previous ordinary open and close produces another calculation. This example requests TradingView’s HA series rather than presenting that approximation as standard HA.
Can I trade at the displayed Heikin Ashi close?
It is a synthetic average, not necessarily an executable price. Keep signal calculation separate from fills. TradingView documents standard-OHLC fills for strategies on HA charts; even then costs and execution assumptions matter.
Does a missing wick prove order-flow absorption?
No. The wick follows from the synthetic open, close, high and low calculation. It does not identify who traded or reconstruct every intrabar attempt to buy or sell.
Do these candles never change?
The developing candle can change with current data. The example confirms markers at chart-bar close and requests the same timeframe without lookahead. That is a specific timing choice, not a certification of every custom HA script.
Is more smoothing always better?
It changes the representation and can delay or remove events. The example uses standard HA without an extra smoothing parameter; no personal test or improvement percentage is asserted.
How can I evaluate a pattern?
Compare the requested OHLC with TradingView HA candles using the same symbol, session and timeframe. Verify each wick/body condition, then evaluate any strategy on real-price execution assumptions. A pattern count alone is not a win rate.