Twelve candlestick reversals — as implemented
The scanner follows the read-back specification, not the textbook.
The sequence
- Trend — ≥15 calendar days on the daily; pattern sits at the extreme (least-squares slope + high/low check).
- Pattern — one of the twelve, on the selected timeframe.
- Confirmation candle (CC) — the very next candle; green for bullish, red for bearish. Colour mandatory.
- Trigger — any later candle breaking CC's high (buy) or low (sell) after the 0.5% buffer.
- Invalidation — pattern extreme breaking before trigger kills the setup.
Levels (user-refined from the original spec)
- Entry = CC extreme exactly — no buffer. Bull: CC.high · Bear: CC.low.
- Stop = pattern extreme × (1 ∓ 0.5%). The 0.5% buffer moves the stop away from your position so a wick doesn't whipsaw you (bull: 0.5% below the pattern low; bear: 0.5% above the pattern high).
- R = entry − stop (bull) or stop − entry (bear). Measured off the buffered stop, so R is what you actually risk from your entry order to your stop order.
- Target = entry ± 1.25R. No buffer on target — placed at the theoretical 1.25R exit.
Original spec was buffered on entry too, with RR 1:1.5. Current build removes the entry buffer (so entries fire exactly at the pattern breakout) and tightens RR to 1:1.25.
Statuses in the table
- pending cc — pattern formed, next candle hasn't printed yet.
- armed — CC confirmed, waiting for the trigger.
- triggered — a later candle broke the CC extreme; trade is live.
- Failed CCs and invalidations are excluded from the list.
Data
All candles come from Dhan HQ API v2 (/v2/charts/historical for daily, /v2/charts/intraday for 1/5/15/25/60 min).
The scrip master is the detailed CSV from Dhan; the scanner filters NSE cash equities, F&O-eligible underlyings and major indices only.
Daily candles are cached to disk per trading day; re-scans are near-instant.