TradingView chart patterns

Shark harmonic pattern: measure OXABC before trading C

The Shark harmonic pattern is an O-X-A-B-C price structure described by Scott Carney. It ends at C, where an extended BC move reaches a potential reaction area. Carney describes it as a precursor to the 5-0. A ratio match identifies a candidate; it does not confirm a reversal. Check the reference leg carefully: his original Shark presentation measures the 0.886 to 1.13 completion band against OB.

See the decision guide

Read O-X-A-B-C without importing XABCD labels

The source diagrams label the starting point 0; this page writes O to distinguish the point from a numeric zero. In the bullish orientation, O is a low, X a high, A a pullback low, B a high beyond X, and C the next low. The bearish orientation reverses those directions. Shark completion is C. D belongs to the possible later 5-0 sequence.

  • Keep all five anchors in chronological order. Choose wick or close prices before measuring, and use that convention for every point.
  • The worksheet requires O < A < X < B with C < A for bullish prices. For bearish prices it requires O > A > X > B with C > A. The ratio tests then narrow the possible C location.
  • A drawing tool or indicator may rename the same swings. Translate its labels before comparing ratios; a label called D in another script may correspond to C here.
  • The original presentation labels its bullish completion levels 0.886 OB and 1.13 OB. Do not silently substitute OX. The formula below states both endpoints and the measurement direction.

Calculate the completion area from B toward O

The table is a bounded teaching worksheet based on the published diagram, not a complete trading method or an official detector. It uses inclusive intervals with no extra tolerance. Carney emphasizes minimum completion requirements and a change in price behavior; the worksheet deliberately fixes the BC/AB upper bound at 2.24 so its pass/fail decisions are reproducible.

  • For bullish anchors, project C = B - r × (B - O). For bearish anchors, use C = B + r × (O - B), where r runs from 0.886 to 1.13.
  • Intersect that completion band with the BC/AB band. An empty intersection means the fixed anchors cannot pass this worksheet, even if each projection looks plausible separately.
  • Reject a zero-length XA, AB or OB denominator. This worksheet adds no XA/OX retracement band; do not infer an extra requirement from the appearance of a sketch.
  • If another definition accepts an extension beyond 2.24, label and test it separately. Do not widen this worksheet after seeing which candidates succeed.
MeasurementExact arithmeticWorksheet interval
B extension of XA|B - A| / |X - A|1.13 to 1.618
BC extension of AB|C - B| / |B - A|1.618 to 2.24
Return toward O|C - B| / |B - O|0.886 to 1.13

Work a bullish example with exact prices

Use hypothetical prices O=100, X=150, A=130, B=160 and C=100 at bars 0, 10, 20, 30 and 40. These coordinates describe geometry only; no intervening candle data or market performance is implied. XA=20, AB=30, OB=60 and BC=60.

  • C=100 lies in the overlap. C=110 does not: BC/AB=50/30 passes, but BC/OB=50/60 is only 0.8333, below the completion minimum.
  • C=92.5 passes BC/OB=1.125 but fails this worksheet because BC/AB=2.25. Reaching the broad OB band alone is insufficient.
  • C=90 gives BC/OB=1.1667 and BC/AB=2.3333; both fail. Keeping O through B fixed prevents an unsuccessful candidate from disappearing through later relabeling.
  • Using BC/OX would give 60/50=1.20 for the original C=100. That is a different denominator and a different result.
  • Mirror prices with 300 minus each price for a bearish example: O=200, X=150, A=170, B=140, C=200. The absolute ratios remain identical.
TestCalculationResult
B extension30 / 20 = 1.500Inside 1.13 to 1.618
BC extension60 / 30 = 2.000Inside 1.618 to 2.24
Completion against OB60 / 60 = 1.000Inside 0.886 to 1.13
OB completion band160 - [1.13, 0.886] × 6092.20 to 106.84
AB extension band160 - [2.24, 1.618] × 3092.80 to 111.46
Overlap of both bandsmax(lower bounds) to min(upper bounds)92.80 to 106.84

A C touch, a confirmed pivot and an entry are different events

For an explicit timing exercise, assume O through B are already confirmed. Require a C low to be strictly below the lows of two completed bars on each side. If C occurs at bar 40, it is provisional until bar 42 closes. A historical marker at bar 40 must not imply that the pivot was known then.

  • The two-bar pivot, 104 trigger, strict retest rejection and five-bar window are teaching choices. They are not claimed as Carney rules. Reverse the inequalities for a bearish candidate.
  • This candidate can fail before price leaves the broader ratio area. Geometric eligibility and the selected confirmation policy answer different questions.
  • A passed filter still needs an execution model: entry order, fill timing, position size, exits, commission and slippage. A protective stop can fill beyond its price during a gap; it is not a guaranteed loss ceiling.
Event in the hypothetical exampleDecision under the exercise
Bar 40 touches C=100Record a provisional endpoint; no entry
Bar 41 or 42 low is 100 or lowerReject the proposed bar-40 pivot
Bar 42 closes with all pivot and ratio tests passedFreeze C=100 and its candle high, assumed to be 104
A bar from 43 through 47 closes above 104Confirmation filter passes if no failure occurred first
After bar 42, price reaches 100 or lower before confirmationCancel the waiting candidate before testing a same-bar close
No qualifying close by bar 47Expire the candidate

Why a bullish Shark can lead to a bearish 5-0

The subsequent 5-0 adds D after price reacts away from C. Carney defines its completion using a 50% BC retracement and a reciprocal AB=CD measurement. The direction can change: a bullish Shark reaction up from C can create a bearish 5-0 candidate at D. A Shark does not guarantee that this next swing will occur.

  • The exact overlap at 130 is a consequence of choosing BC=2×AB in this example. It is not guaranteed for every Shark candidate.
  • The 5-0 source explicitly bounds BC/AB at 1.618 to 2.24. Apply its own full conditions to a later D; do not reuse a Shark label as proof that the next pattern qualifies.
Stage using the same hypothetical anchorsCalculationInterpretation
Shark completes at CC=100Potential upward reaction from the low
Half of BC recovered100 + 0.50 × 60 = 130Possible later D reference
Reciprocal AB length from C100 + 30 = 130Second D reference agrees in this constructed example
Price has not yet reached DD remains unknownDo not label a completed 5-0 at C

Use Pine Script as a manual ratio worksheet

This Pine Script v6 indicator checks manually entered point prices. The defaults reproduce the example. It checks direction and the three fixed intervals, then displays the arithmetic. It does not scan swings, inspect anchor timestamps, confirm pivots, issue alerts or place orders. Confirm chronological anchors yourself before entering their prices.

Original educational arithmetic example. The result depends on entered prices, not the chart symbol or timeframe. Display rounding does not change the comparisons.pine
//@version=6
indicator("Manual OXABC ratio worksheet", overlay = true)
float o = input.float(100.0, "O price")
float x = input.float(150.0, "X price")
float a = input.float(130.0, "A price")
float b = input.float(160.0, "B price")
float c = input.float(100.0, "C price")
float xa = math.abs(x - a)
float ab = math.abs(b - a)
float ob = math.abs(b - o)
float bc = math.abs(c - b)
bool hasLengths = xa > 0 and ab > 0 and ob > 0
bool bullish = o < a and a < x and x < b and c < a
bool bearish = o > a and a > x and x > b and c > a
float bRatio = hasLengths ? ab / xa : na
float impulseRatio = hasLengths ? bc / ab : na
float completionRatio = hasLengths ? bc / ob : na
bool ratiosPass = hasLengths and bRatio >= 1.13 and bRatio <= 1.618 and impulseRatio >= 1.618 and impulseRatio <= 2.24 and completionRatio >= 0.886 and completionRatio <= 1.13
bool candidate = (bullish or bearish) and ratiosPass
var table sheet = table.new(position.top_right, 2, 5, bgcolor = color.white, border_width = 1)
if barstate.islast
    table.cell(sheet, 0, 0, "Manual worksheet", text_color = color.black)
    table.cell(sheet, 1, 0, "No trade signal", text_color = color.black)
    table.cell(sheet, 0, 1, "AB / XA", text_color = color.black)
    table.cell(sheet, 1, 1, str.tostring(bRatio, "#.######"), text_color = color.black)
    table.cell(sheet, 0, 2, "BC / AB", text_color = color.black)
    table.cell(sheet, 1, 2, str.tostring(impulseRatio, "#.######"), text_color = color.black)
    table.cell(sheet, 0, 3, "BC / OB", text_color = color.black)
    table.cell(sheet, 1, 3, str.tostring(completionRatio, "#.######"), text_color = color.black)
    table.cell(sheet, 0, 4, "Fixed-rule result", text_color = color.black)
    table.cell(sheet, 1, 4, candidate ? "Geometry passes" : "Geometry fails", text_color = color.black)

Carry the worksheet into a reviewable implementation

Pine Script AI Coding Agent can help draft a script from your written specification. Supply the point convention and numeric examples above, then define swing selection and the precise time at which an alert becomes eligible. Review the generated source and test rejected cases as well as accepted ones.

  • Ask for separate outputs for the candidate price, pivot bar, confirmation bar and rejection reason. An automatically found historical shape needs a timing audit before it becomes an alert.
  • AI Chart Analysis accepts chart images for visual review. Annotate OXABC, keep the price scale visible, and compare the response with the exact prices in your worksheet.
  • A screenshot response cannot establish exact ratios or a verified Shark detection rate. Pine syntax validation also does not prove trading accuracy or profitable execution.
Where Pineify fits

Pine Script AI Coding Agent

Draft and inspect a Pine Script implementation of your explicit swing, ratio and confirmation rules.

Also useful: AI Chart Analysis. Review an annotated chart image, then verify its measurements against your numeric worksheet.

Draft a ratio-checking script

Frequently asked questions

Educational information, not investment advice. All point prices and confirmation rules in the worked example are hypothetical. Shark and 5-0 are attributed to Scott Carney; this independent worksheet is not an official Harmonic Trader product. Matching ratios, syntax validation and AI chart review do not establish a profitable strategy.

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.