Chart pattern guide

ABCD pattern: ratios, timing and confirmation

An ABCD pattern connects four alternating swing points with three legs: AB, BC and CD. In the equal-leg version, CD repeats the price distance of AB after the BC retracement. D marks a possible completion area; a reversal trade still needs a separate confirmation and a failure rule.

See the decision guide

Choose four points in time order

For a bullish reversal hypothesis, A is a high, B a low, C a lower high and D a lower low. The bearish version reverses those directions. Use the same timeframe, session and price source throughout. Wick extremes and closing prices can produce different measurements, so specify which one defines your points.

  • Require A, B, C and D to occur on increasing bar indices; do not reuse one bar for two points
  • Define how to handle equal highs or lows and a newer, more extreme pivot before coding
  • Cancel an unfinished bullish candidate if price breaks above A; reverse the condition for a bearish candidate
  • Keep the last unconfirmed swing provisional instead of rewriting earlier trades after it moves
PointBullish reversal candidateSelection constraint
AStarting swing highUse a fixed pivot or reversal-threshold rule
BSwing low below AMeasure AB only after B is confirmed
CRetracement high between B and AFreeze the candidate once C is confirmed
DCompletion low below BDistinguish a projected price from a confirmed swing

AB=CD, classic ABCD and extensions use different ratios

TradingView distinguishes three versions in its drawing-tool documentation. Pick the version before measuring. For the formulas below, L_AB = |B - A|, L_BC = |C - B| and L_CD = |D - C| are absolute price distances, not the visual lengths of lines on a screen.

  • Equal-leg projection: D = C + (B - A). The signed AB move is repeated from C
  • Retracement ratio: r = L_BC / L_AB. If CD equals AB, its BC extension is 1 / r
  • A 0.618 retracement therefore pairs with about 1.618 of BC; a 0.786 retracement pairs with about 1.272
  • Carney describes C retracements from 0.382 to 0.886 for his AB=CD framework. State the framework instead of mixing its range with an unrelated pattern definition
VersionPrice relationshipTime relationship
AB=CDL_CD / L_AB = 1TradingView describes equal AB and CD duration
Classic ABCDL_CD / L_BC = 1.272 or 1.618Specify any time filter separately
ABCD extensionL_CD / L_AB = 1.272 or 1.618Specify any time filter separately

Keep exact definitions separate from tolerances

Exact equality is a reference value. A detector needs an explicit acceptance interval. The following bullish example is hypothetical, uses linear price differences and measures duration in chart bars. The tolerances are illustrative testing choices, not established settings or evidence of profitability.

  • Price agreement does not imply time agreement; report both ratios
  • Choose chart-bar count or elapsed clock time. Sessions, weekends and missing bars make them different measurements
  • Record tolerance units: a 5% leg-length error differs from five percentage points of retracement
  • If the price zone is reached after the time window, reject it under this rule rather than widening the window afterward
MeasurementHypothetical valuesResult
Observed pointsA = 120, B = 100, C = 112.36AB = 20; BC = 12.36; retracement = 0.618
Equal-leg completionD = 112.36 + (100 - 120)D = 92.36; CD = 20
Price tolerance|L_CD / L_AB - 1| ≤ 0.05CD from 19 to 21; D from 91.36 to 93.36
Time symmetryA at bar 10, B at 20, C at 26AB takes 10 bars; exact time match puts D at bar 36
Time tolerance0.8 ≤ duration_CD / duration_AB ≤ 1.2CD takes 8 to 12 bars; D at bars 34 to 38

A D label can appear before the trade was knowable

A pivot method that needs three bars to the right can confirm a D low at bar 36 only after bar 39 has closed. Drawing the label back on bar 36 does not make the signal available there. Keep the swing bar, detection bar, confirmation bar and order fill as separate timestamps. TradingView documents this past-plotting issue in its repainting guide.

  • If entry requires a confirmed D pivot, evaluate it no earlier than the pivot confirmation
  • A projected-zone entry can occur earlier, but it is a different rule that does not yet know the final D swing
  • If confirmation requires a close above a particular high after D, define that high and the maximum wait in advance
  • Use actual strategy fill timestamps: TradingView market orders normally fill on the next available tick, often the next bar open under default settings

Incomplete structure and failed reversal are different outcomes

An ABCD label describes geometry. It does not establish a trade result. In the hypothetical bullish example, separate the states below so an unfinished candidate is not counted as a completed trade and a losing trade is not removed by relabeling the pattern.

  • A sample test could cancel a bullish candidate below 91.36 and require a close above the confirmed D-bar high within five bars of confirmation
  • If testing that sample, specify the stop, target and position risk before entry; a zone boundary alone is not a complete exit policy
  • A gap through a stop can produce a worse fill than the stop price. Model costs and inspect the order assumptions
StateWhat happenedHow to record it
IncompleteA, B and C are known; price has not reached the D zoneCandidate only; no completed D or reversal entry
Completed, unconfirmedPrice reaches the allowed zone but the entry trigger never occursNo trade; expire it at the written deadline
Invalidated before entryPrice crosses the preset cancellation boundary before confirmationCanceled candidate; keep it in the detection audit
Failed reversalAn eligible entry occurs, then its stop or time exit closes the tradeRetain the loss and all trading costs
ExtensionCD runs beyond the equal-leg toleranceReject the equal-leg setup; assess an extension only under a separately declared rule

Turn the measurements into an auditable TradingView test

For ABCD pattern trading, give the Pine Script AI Coding Agent the pivot method, allowed ratios, tolerances, expiry and trade rules. Ask for separate markers for the swing and the time it became known. Review the generated source and compile it in TradingView before evaluating a strategy on standard price candles.

  • Keep a later period out of parameter selection; report candidate count as well as executed trades
  • Export the TradingView trade list and use Backtest Report to inspect the recorded entries, exits, drawdown and trade distribution
  • Compare exported entry times with the confirmation markers yourself. A report of trades cannot prove that the original signal avoided future information
  • For five-point XABCD work, the Harmonic Pattern Calculator accepts XABC prices and calculates candidate D zones. It does not select ABCD swings or scan live charts
Where Pineify fits

Pine Script AI Coding Agent

Turn your written point-selection and ratio rules into editable Pine Script. Specify the confirmation delay and review the generated logic before testing it in TradingView.

Also useful: Backtest Report. Analyze exported TradingView trades, then compare their entry times with your signal-confirmation record. Imported results cannot verify the original point-selection logic.

Build the ABCD rules

Frequently asked questions

Educational information only, not investment advice. The price, tolerance and entry examples are hypothetical and have no demonstrated trading performance. Patterns can fail, and historical or simulated results do not guarantee future returns.

Sources and verification