cypherPattern
The Cypher Pattern is another harmonic pattern that uses five swing points (X, A, B, C, D). It’s less common than Gartley or Bat, but many traders like it for its reliability when the market makes deeper “fakeout” moves before completing. It helps anticipate potential reversal zones with specific Fibonacci ratios.
Syntax
cypherPattern(pointX, pointA, pointB, pointC, pointD, styles?)
Parameters
pointX (PricedData) · First anchor, starting point of the pattern.
pointA (PricedData) · Second anchor, completing the XA leg.
pointB (PricedData) · Third anchor, completing the AB leg.
pointC (PricedData) · Fourth anchor, creating a deep move against AB.
pointD (PricedData) · Fifth anchor, the completion and potential reversal zone.
styles (CypherPatternStyleOverrides) · Style and display options:
backgroundColor(RGBAColor | BaseColors): background color used for the pattern area.bold(boolean): render text using a bold font weight.color(RGBAColor | BaseColors): line color of the pattern.fillBackground(boolean): fill the background area of the pattern.fontsize(number): font size used for text labels.italic(boolean): render text using italic style.linewidth(number): thickness of the pattern lines.textcolor(RGBAColor | BaseColors): color of the label text.transparency(number): transparency level.
Return Value
(string) · The drawing ID of the created Cypher Pattern.
Example
Here we draw a Cypher every 200 candles, connecting five pivots from the past.
Result

Tips
The Cypher’s key feature is point C going beyond XA (a deeper extension), while D pulls back into a Fibonacci zone (often 0.786 of XC).
Best used on trend reversals after strong moves.
Confirm at point D with extra signals (oscillator divergence, volume, or support/resistance).
Warning
Don’t confuse Cypher with the Gartley or Bat — the main difference is C leg extends further than XA. Misplacing this point invalidates the pattern.
Last updated