All indicators

Anti-patterns

By LuxAlgoJun 14, 2026

Anti-patterns is an indicator on Vela, our next-generation charting platform, written in Pine Script®.

Static chart image

Anti-patterns brings the reciprocal-ratio harmonic suite, the anti-patterns, to the chart as one detector for the anti-Gartley, anti-Bat, anti-Butterfly, anti-Crab and anti-Cypher. A zigzag of 10-bar swings supplies the XABCD points, and a candidate must land its B retracement, C point and D completion inside a pattern's ratio windows, within a 5% tolerance, before anything draws.

Published anti ratio tables vary between sources, so the build shows its work: labels can append the measured B retracement, D completion and BC projection so any detection can be audited against another table.

How to Trade the Anti-patterns?

  • Bullish completion (D at a trough): look for an upside reaction inside the completion zone; anti-patterns resolve with the newer move rather than against it.
  • Bearish completion (D at a peak): the mirror read.
  • Completion Zone box: spans the XA-based completion level (XC-based for the anti-Cypher) and the reciprocal BC projection level, extending until a reaction swing confirms.
  • Disappearing drawings: an extending D redraws the same structure and can exit every ratio window. The removal itself is information.

Anti-patterns Settings

  • Swing Length (default 10): pivot half-length for the swings; larger finds larger structures, confirmed later.
  • Ratio Tolerance % (default 5): allowed deviation around each ratio window, absorbing table differences.
  • BC Projection Cross-Check (default on): accepts completions only with a BC projection between 1.128 and 4.236.
  • Anti-Gartley, Anti-Bat, Anti-Butterfly, Anti-Crab, Anti-Cypher (all on by default): enable each table individually.
  • Style toggles cover point labels, measured ratios, the dashed triangle lines, the completion zone and the swing zigzag.

Frequently Asked Questions

Bat®, Crab®, Shark®, AB=CD® and 5-0® are registered trademarks of their owner, used here only to identify the patterns. LuxAlgo's tools are independent implementations and are not affiliated with or endorsed by the trademark owner.

Free to use

Run it on Vela. Go further with a paid plan.

  • Up to 500 Custom Alerts, with webhook automation
  • Up to 10× the chart history of Free
  • Orderflow lookback up to full history
  • More Quant usage to customize it, plus extra usage when you need it
  • Futures data alongside crypto, stocks, forex and commodities
See plans
Original indicatorBuilt in-house by LuxAlgo

Run it on Vela. Make it yours with Quant.

Open this indicator free on Vela, our next-generation charting platform. Then ask Quant, our coding agent built into Vela, to retune it or turn it into a backtested strategy of your own.