A Cypher pattern is a five-point XABCD structure used to mark a possible reversal area. Its defining measurement is the D retracement: 78.6% of XC, measured from C toward X. Using XA instead moves the completion price. Matching the ratios identifies a candidate; it does not establish that price has reversed.
TradingView's current Cypher drawing-tool guide specifies B at 0.382 to 0.618 of XA, C at 1.13 to 1.414 of XA, and D at 0.786 of XC. This page uses that convention. A detector configured with a 1.272 minimum for C applies a narrower filter; record that choice rather than silently treating the two ranges as identical.
Points must occur in time order X, A, B, C, D. For the bullish example, X is a low, A a high, B a retracement above X, C a new high above A, and D a pullback between X and B. Reverse these directions for a bearish candidate.
Use price differences, not diagonal line lengths. Keep one price convention, such as high and low wicks, for every pivot. Reject zero-length XA or XC.
Ratios alone do not check direction. Absolute distances can look correct even when the anchors are in the wrong order.
Point
Absolute price-distance ratio
Reference level
B
|A - B| / |A - X|
0.382 to 0.618
C
|C - X| / |A - X|
1.13 to 1.414
D
|C - D| / |C - X|
0.786
Recalculate a bullish candidate and its bearish mirror
The original diagram uses hypothetical prices and equal drawing spacing, not market observations. For X = 100, A = 200, B = 150 and C = 230, the projected D price is 230 - 0.786 × 130 = 127.82. The signed formula D = C - 0.786 × (C - X) also works when C is below X.
Original arithmetic illustration. The dashed XC ruler spans 130 price units; D is 102.18 units below C. No future reversal or trade outcome is shown. View original source
The bearish cypher pattern mirrors each bullish price around 200: new price = 400 - original price. Its D is a rebound from C toward X, where a downward reversal would still need separate confirmation.
These calculations verify geometry only. They contain no OHLC history, transaction costs, entry fills or performance result.
Check
Bullish illustration
Bearish mirror
X, A, B, C, D
100, 200, 150, 230, 127.82
300, 200, 250, 170, 272.18
AB / XA
50 / 100 = 0.500
50 / 100 = 0.500
XC / XA
130 / 100 = 1.300
130 / 100 = 1.300
CD / XC
102.18 / 130 = 0.786
102.18 / 130 = 0.786
Reject the wrong D anchor before judging the shape
Keep X = 100, A = 200 and C = 230 fixed. The correct D is 127.82. Each alternative below applies the same 0.786 number to a different measurement, so a familiar Fibonacci label can hide a material price error.
The C extension uses XC / XA. Substituting BC / AB changes both numerator and denominator; it is not another way to calculate the same ratio.
Do not relocate X or C after seeing the outcome to make D land on a preferred candle. Freeze the anchors and log a new candidate if your selection rule later chooses different pivots.
Calculation
Price
What went wrong
A - 0.786 × (A - X)
121.40
Uses XA and starts from A
C - 0.786 × (A - X)
151.40
Starts from C but still uses XA
X + 0.786 × (C - X)
202.18
Measures from X toward C instead of retracing from C
C - 0.786 × (C - X)
127.82
Correct XC retracement from C
Write tolerance as a numerical acceptance test
For a teaching specification named CY-1, use the reference B and C intervals inclusively and allow an absolute D-ratio error of 0.010: |CD / XC - 0.786| ≤ 0.010. This is a custom allowance of one percentage point of XC, not a 1% relative error or a recommendation. Evaluate unrounded prices before displaying rounded ratios.
With XC = 130, the allowed D price band is 126.52 to 129.12. Its half-width is 130 × 0.010 = 1.30 price units.
Decide how tick rounding affects acceptance before testing. A displayed 0.786 can conceal an unrounded value outside a narrower allowance.
A wick-based specification rejects a C wick beyond its upper extension limit. A close-based exception is a different rule and must be named; do not switch between them to rescue a candidate.
Hypothetical case
Calculation
CY-1 decision
Original points
D ratio = 0.786
Pass the ratio tests
Change D to 129.12
(230 - 129.12) / 130 = 0.776
Pass at the inclusive boundary
Change D to 130.00
(230 - 130) / 130 = 0.769231
Reject: outside the D band
Change B to 135.00
(200 - 135) / 100 = 0.650
Reject: B retracement too large
Change C to 220 and D to 125.68
XC / XA = 1.200; CD / XC = 0.786
Pass CY-1; fail a separate C minimum of 1.272
Separate a touch, a confirmed pivot and a failed setup
CY-1 is an arithmetic example, not a finished trading strategy. For an optional timing exercise, define a low pivot as a bar with three strictly higher lows on each side, using completed bars and rejecting ties. Mirror the rule for highs. Assume XABC were already confirmed and frozen before the D touch.
An annotation at bar 50 must disclose that D became known at bar 53. Backdating the annotation does not permit an alert or simulated entry at the earlier price.
For this timing exercise, cancel first if a completed bar after bar 50 has a low below the saved D, then check confirmation or the optional entry filter. If a bar both breaks D and closes above its high, cancellation wins. For bearish setups, use a high above D and a close below the saved D-candle low.
After confirmation, allow the optional entry filter only on bars 53 through 62 inclusive; otherwise expire the candidate. These cancellation and expiry rules belong to the exercise, not a universal Cypher standard.
A move through X invalidates the illustrated price ordering. A move through the saved D may cancel this stricter setup earlier. Neither threshold guarantees a stop order can fill at its trigger price.
Pattern rejection, setup cancellation and a losing executed trade are different records. A strategy still needs order timing, position sizing, costs and exits before its results can be evaluated.
Event
Available evidence
Status
Bar 50 touches 127.82
The next three bars are unknown
Projected area touched; D provisional
Bar 53 closes; bars 51 to 53 all have lows above 127.82
The left-side test also passed
D pivot confirmed at bar 53
Alternative: bar 52 makes a lower or equal low
The strict bar-50 pivot test fails
Reject this D; evaluate any replacement separately
A later bar closes above the saved D-candle high
Only considered on or after pivot confirmation
Optional bullish entry filter passed
Draw the anchors, then review the evidence
In TradingView, select the Cypher pattern drawing tool and place X through D in time order. Its Coordinates settings let you enter each anchor price and bar number. A manual drawing helps inspect a proposed structure; it does not prove an objective detector selected those points.
Save the symbol, timeframe, chart date, price convention and the five prices. Add your C interval and D tolerance to the notes so the drawing can be reconstructed.
For Pineify AI Chart Analysis, upload a clear screenshot with the symbol, timeframe and labeled anchors. Use the response to review visible structure, then check every price and ratio against the chart data. Screenshot interpretation can miss small price differences.
For a Coding Agent request, supply the exact ratio tests, pivot rules, candidate selection, timing and rejection policy. Request measured ratios and both pivot and confirmation timestamps as outputs. Review the generated Pine Script, validate its syntax, and test bar by bar before adding orders.
Where Pineify fits
AI Chart Analysis
Upload a labeled Cypher screenshot for a second review of visible structure. Recalculate the anchor prices yourself; image analysis does not establish exact ratio compliance or predict a reversal.
Also useful: Pine Script AI Coding Agent. Turn your written Cypher rules into a script draft, then inspect the calculations, confirmation timing and syntax. No automatic recognition accuracy is promised.
D is the 0.786 retracement of XC, starting at C and moving toward X. For X = 100 and C = 230, D = 230 - 0.786 × 130 = 127.82. Measuring XA gives a different level.
The price directions reverse while the absolute ratio calculations stay the same. In the mirrored example, X = 300, A = 200, B = 250, C = 170 and D = 272.18. A rebound to D is a candidate for review, not proof of a downward reversal.
Different C ranges, pivot selection, wick or close inputs, tolerances and confirmation delays can produce different candidates. Record each setting and compare the same anchor prices before deciding that either detector is wrong.
A touch confirms only that price reached the projected area. A pivot rule may require later bars, and an entry filter may require another condition. Ratios, pivot confirmation and trade execution need separate timestamps.
Educational information, not investment advice. Prices, CY-1 thresholds and event paths are hypothetical. No backtest, win rate or expected return is presented. Pattern completion does not guarantee reversal or profit.
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.