TradingView candlestick patterns

Hikkake pattern: failed inside-bar breakouts

A Hikkake pattern is an inside-bar breakout that reverses through the opposite edge of the inside bar within three subsequent bars. A bullish setup first breaks downward; a bearish setup first breaks upward. The initial break is only a candidate. A return inside the range alone does not verify the pattern, and verification does not guarantee a profitable trade.

See the decision guide

Define the three-bar setup before looking for failure

Call the reference bar M, the inside bar I and the immediately following breakout bar B. H and L mean each bar's high and low. Dan Chesler's original April 2004 article describes the basic Hikkake using I and B, with M needed to establish containment. Candle color and body size do not determine the basic setup.

  • Equality fails the strict comparisons: an inside high equal to the reference high is not inside under these rules, and touching the trigger does not cross it.
  • A bar breaking both sides of I fails the breakout-bar definition. The directional high and low requirements prevent treating an outside bar as a basic Hikkake candidate.
  • The failed move is the initial breakout direction. A bullish Hikkake can occur during an existing uptrend or a decline; it is not inherently a reversal of the larger trend.
  • Modified Hikkake adds restrictions before the inside bar. This page covers the basic pattern and does not silently apply those additional filters.
StageBullish candidateBearish candidate
Inside bar IHI < HM and LI > LMHI < HM and LI > LM
Breakout bar BHB < HI and LB < LIHB > HI and LB > LI
Saved triggerInside high HIInside low LI
Verification on B+1, B+2 or B+3A high strictly above HIA low strictly below LI
No verification by B+3Expire the candidateExpire the candidate

A price crossing and a closing confirmation are different tests

Chesler describes verification when price crosses the opposite inside-bar extreme. LEAN's published Hikkake implementation instead uses a close beyond that extreme. Both distinctions matter when comparing detectors. This page and its script use the price-crossing rule, evaluated at the end of each bar; they do not require the close to remain beyond the level.

  • The three-bar clock begins after B, not after I. B+3 is eligible; B+4 is too late for that candidate.
  • On an hourly chart, count three subsequent chart bars, not three calendar days. Session gaps and missing bars affect elapsed time.
  • A completed-bar marker says the crossing occurred somewhere in that bar. It does not say an order placed after the close could fill at the crossed level.
Bullish trigger at 104Price-crossing rule used hereClose-based variant
High 104.20, close 103.50Verified on an eligible completed barNot confirmed
High 104.20, close 104.10VerifiedConfirmed
High 104.00, close 103.50Not verified: only a touchNot confirmed
High 103.80, close 102.00Not verified: return inside is insufficientNot confirmed

Follow a bullish timeline without using future bars early

These hypothetical OHLC values use arbitrary price units. The inside range is 101 to 104. At the close of B, there is still no evidence that the downside breakout has failed. Only the later crossing establishes verification under the stated rule.

  • Expiry alternative: change only the B+3 high to 103.90. With no crossing on any of the three eligible bars, the candidate expires. A B+4 high of 105 cannot rescue it.
  • Inside-boundary alternative: change I high to 106. Equality with M high rejects I, so there is no candidate to confirm later.
  • Breakout-boundary alternative: change B high to 104 while retaining its low of 100. The required lower high fails even though price broke below I.
  • A later fall after the valid B+3 signal is a failed outcome, not a reason to delete the historical confirmation. Record the later result separately.
BarOpenHighLowCloseWhat is known at the close
M10210699103Reference range
I103104101102Strictly inside M
B102103100100.50Bullish candidate; save 104
B+1100.50102.5099.50102Back inside, but no verification
B+2102104101.50103Touches 104; still pending
B+3103104.20102103.50Verified by high > 104; close variant fails

Check the bearish mirror and a gap through the trigger

A bearish candidate has an upward initial break and a downward verification. The inside low is the trigger; neither the mother-bar low nor the breakout-bar low replaces it. Each follow-up row below is an alternative to the same three-bar setup.

  • A gap can put the first available price beyond the threshold. The range test can recognize the event but does not model execution at 102.
  • An OHLC bar containing both an entry trigger and a hypothetical stop does not reveal which traded first. Use finer data and explicit fill assumptions for a strategy test.
  • Keep normal OHLC candles, timeframe, session and feed fixed. Synthetic candle values test a different series.
Bar or alternativeOpenHighLowCloseClassification
M103107100104Reference
I104105102103Inside range 102 to 105
B103106103105.50Bearish candidate; save 102
B+1 crossing105.50106101.80102.50Verified despite close above 102
B+1 touch only105.50106102102.50Pending, not verified
B+1 gap lower101.50101.80100.50101Verified; 102 fill cannot be assumed

Use a finite-state detector with an explicit expiry

This Pine Script v6 example tracks one candidate at a time. It ignores new setups while that candidate is pending, including the bar that confirms or expires it. This overlap policy is a custom implementation choice; it differs from LEAN, where a new setup takes precedence. No signal is placed on an earlier bar.

  • Gray B and S circles mark candidates, not verified signals. H+ and H- triangles mark the later verification bar. Choose Once Per Bar Close when creating an alert.
  • barstate.isconfirmed restricts evaluation to the closing update in real time. The high-low test can still accept a wick crossing; waiting for bar close does not turn it into a close-price test.
  • To test a close-based variant, change the verification comparisons to the close and keep its results separate. Do not combine both variants into one performance sample.
  • The indicator has no orders, position sizing, stop logic or returns. Syntax validation cannot establish profitability or prove the price path within a bar.
Completed-bar price-crossing detector; triangles mark verificationpine
//@version=6
indicator("Hikkake: three-bar verification", overlay = true)

var int direction = 0
var int setupBar = na
var float trigger = na
bool bullSetup = false
bool bearSetup = false
bool bullVerified = false
bool bearVerified = false

inside = bar_index >= 2 and high[1] < high[2] and low[1] > low[2]
bullCandidate = inside and high < high[1] and low < low[1]
bearCandidate = inside and high > high[1] and low > low[1]

if barstate.isconfirmed
    if direction != 0
        age = bar_index - setupBar
        if age >= 1 and age <= 3
            bullVerified := direction == 1 and high > trigger
            bearVerified := direction == -1 and low < trigger
        if bullVerified or bearVerified or age >= 3
            direction := 0
            setupBar := na
            trigger := na
    else if bullCandidate or bearCandidate
        direction := bullCandidate ? 1 : -1
        setupBar := bar_index
        trigger := bullCandidate ? high[1] : low[1]
        bullSetup := bullCandidate
        bearSetup := bearCandidate

plotshape(bullSetup, title = "Bullish candidate", style = shape.circle, location = location.belowbar, color = color.gray, size = size.tiny, text = "B")
plotshape(bearSetup, title = "Bearish candidate", style = shape.circle, location = location.abovebar, color = color.gray, size = size.tiny, text = "S")
plotshape(bullVerified, title = "Bullish verified", style = shape.triangleup, location = location.belowbar, color = color.teal, size = size.small, text = "H+")
plotshape(bearVerified, title = "Bearish verified", style = shape.triangledown, location = location.abovebar, color = color.red, size = size.small, text = "H-")
alertcondition(bullVerified, "Bullish Hikkake verified", "Price crossed above the saved inside high within three bars")
alertcondition(bearVerified, "Bearish Hikkake verified", "Price crossed below the saved inside low within three bars")

Keep the detection result separate from the trading result

A Hikkake observation answers whether a specified breakout failed within a specified window. Testing a trade requires additional choices: when to enter after detection, where and how to exit, position size, spread, commissions and slippage. Freeze those choices before inspecting outcomes.

  • For the bullish timeline, log I, B and B+3 timestamps and the saved 104 trigger. Record the actual entry price separately instead of assuming the earlier 104 crossing was tradable after the close.
  • Retain expired candidates, verified signals and later losses in separate counts. Selected chart examples cannot establish a win rate.
  • Ask Pine Script AI Coding Agent to adapt the explicit state, trigger, expiry and overlap policy. Review generated changes against the boundary examples and rerun syntax validation.
  • Use Trading Journal to record executions and notes about the tested rule version. A journal records the user's sample; it does not validate the detector or automatically prove an advantage.
Where Pineify fits

Pine Script AI Coding Agent

Draft or revise a detector using the inside-bar inequalities, saved trigger and three-bar expiry. Review the source and chart matches before using its alerts.

Also useful: Trading Journal. Record trade executions and notes for the rule version you tested, including missed entries and losses. Keep those results separate from pattern counts.

Draft Hikkake detection rules

Frequently asked questions

Educational information, not investment advice. OHLC examples are hypothetical and report no trading performance. Pattern verification does not guarantee an executable price, a lasting reversal or profit.

Sources and verification

Published by Pineify. Pineify is an independent product and is not affiliated with TradingView. Sources support the technical explanations; examples do not establish trading performance.