Academy
NIFTY 50Loading
BANKNIFTYLoading
INDIA VIXLoading
SENSEXLoading
MCX Crude OilLoading
MCX GoldLoading
MCX SilverLoading
MCX Natural GasLoading
NIFTY 50Loading
BANKNIFTYLoading
INDIA VIXLoading
SENSEXLoading
MCX Crude OilLoading
MCX GoldLoading
MCX SilverLoading
MCX Natural GasLoading
NIFTY 50Loading
BANKNIFTYLoading
INDIA VIXLoading
SENSEXLoading
MCX Crude OilLoading
MCX GoldLoading
MCX SilverLoading
MCX Natural GasLoading
NIFTY 50Loading
BANKNIFTYLoading
INDIA VIXLoading
SENSEXLoading
MCX Crude OilLoading
MCX GoldLoading
MCX SilverLoading
MCX Natural GasLoading
Module G · Scanner & Algo ReadinessAdvanced Free

Turning Zone Logic into Scanner Rules

8 min read
Learning objective
Express every subjective zone criterion as an objective, measurable, codeable condition.

The translation problem

A scanner cannot process 'clean', 'strong' or 'good location'. You must replace every qualitative word with a numeric condition. 'Clean base' becomes: base candle count ≤ 3 AND each base candle body-to-range ratio ≤ 0.5. 'Strong leg-out' becomes: leg-out body-to-range ratio ≥ 0.6 AND leg-out body > 1.5× average base body.

Defining freshness for a scanner

Fresh = number of times price has touched the zone proximal since formation = 0. Tested once = 1 prior touch with a bounce. Use the closing price — a wick into the proximal but no close inside = not a touch. This is a hard, countable rule.

Defining strength for a scanner

Gap-out: opening price of leg-out > closing price of last base candle (for demand). Two exciting candles: count of consecutive leg-out candles with body ≥ 0.5× range ≥ 2. One exciting candle: count = 1. These are binary conditions the code can evaluate.

Start with 2–3 rules only

A scanner with 10 conditions on 5 years of data will find 3 trades. Start with 2–3 conditions (e.g., base ≤ 3 candles + leg-out body ≥ 0.6 range + zone fresh), generate a shortlist, then manually review. Add more conditions only after seeing what you're missing in the manual review.

Practice checklist

  • Replace each qualitative word with a specific numeric threshold
  • Freshness: count of touches to proximal since formation
  • Strength: body-to-range ratio of leg-out candle(s)
  • Start with 2–3 conditions, review manually, add complexity only when needed

Mistakes to avoid

  • Coding vague words without numerical definitions — the scanner will produce garbage
  • Adding 10+ conditions immediately — too few results, impossible to validate
Quick check
A scanner needs zone quality expressed as…
Risk note — Automating a flawed rule just produces bad signals faster — validate on paper first.