Svopex S&D ScanSvopex S&D Scan
Multi-symbol Supply & Demand zone scanner that displays the status of up to 40 instruments in a single table. Built on the same detection logic as Svopex Supply &
Demand Zones (base + explosive ATR candle pattern), but extended to portfolio-wide screening with on-chart zone drawing for the active symbol.
What it does
For each of up to 40 user-defined symbols (default: NAS100, XAU, EURUSD, US30, SPX500, WTICO, XAG, BTC + 27 main and cross OANDA currency pairs), the scanner detects
supply and demand zones in real time and shows in the result table where price currently sits relative to those zones.
Detected statuses (priority order: IN > NEAR > WAS_IN > none):
- IN SUPPLY / IN DEMAND — price is currently inside an active zone
- NEAR SUPPLY / NEAR DEMAND — price is within nearMult × ATR of the zone edge
- WAS IN SUPPLY / WAS IN DEMAND — price was inside a zone within the last N closed bars but is no longer in/near it (zone has been broken). Useful as a follow-up
signal after price entered a zone and the zone was invalidated
- (blank) — no relevant state
The table can be filtered to show only hits, and rows update as the chart timeframe changes — the scanner always operates on the chart's current TF.
Zone detection logic (identical to Svopex Supply & Demand Zones):
- 1 to N "base" candles with body ≤ baseBodyPct × ATR
- Followed by an explosive candle with body ≥ explMult × ATR
- The high/low of the base candles defines the zone boundaries
- The zone is invalidated when price breaks through it according to breakPct threshold (with optional wick or body-only mode)
On-chart zone drawing
For the current chart symbol, the scanner also draws supply (red) and demand (green) boxes the same way as Svopex S&D Zones — so you can use it as a single-symbol
indicator and as a multi-symbol scanner in one. Switching the chart to any other symbol redraws the boxes for that symbol.
---
Parameters
Symbols (1–40)
- Each slot accepts a BROKER:TICKER format (e.g. OANDA:EURUSD, BINANCE:BTCUSD). Empty slots are skipped (mapped to chart symbol internally and deduplicated by Pine).
Zone detection
- Max base candles (default 3, range 1–6) — maximum number of base candles that can precede the explosive move.
- Base body ≤ ATR × (default 0.5) — the body of base candles must be at most this multiple of ATR.
- Explosive body ≥ ATR × (default 1.5) — the body of the explosive candle must be at least this multiple of ATR.
- ATR length (default 14) — period for ATR calculation.
- Max active zones per side (default 20, range 1–100) — how many supply/demand zones to track per symbol; oldest are dropped when the limit is exceeded.
Zone Break
- Include wicks (else body only) (default true) — when ON, the break check uses candle high/low (wicks); when OFF, only body (max/min of open, close).
- Break threshold (%) (default 0, range 0–100) — how far price must penetrate the zone to invalidate it. 0 = zone breaks at first touch of the near edge, 50 = breaks
at midline, 100 = breaks only after fully crossing the zone.
Proximity
- Near threshold (ATR ×) (default 1) — distance from zone edge (in ATR units) within which price counts as "NEAR".
Was-in zone
- Bars back for 'was in zone' (default 10, range 1–50) — lookback window for the WAS_IN status. If price was inside a zone within the last N confirmed bars but is no
longer there, the symbol shows WAS IN SUPPLY / WAS IN DEMAND. Only triggers when no IN/NEAR status applies.
Current-symbol zones
- Draw zones for current chart symbol (default true) — toggles zone box rendering on the chart.
- Max drawn zones per side (default 20) — limit for boxes drawn on chart.
- Supply fill / Demand fill (default red 80% / green 80%) — zone box colors.
Table
- Position (default top_right) — top/bottom × left/right/middle.
- Show only hits (default true) — hides symbols with no signal.
- Text size (default normal) — tiny / small / normal / large / huge.
- Strip exchange prefix (default true) — shows EURUSD instead of OANDA:EURUSD.
---
Typical usage
- Open any chart and timeframe — the scanner immediately shows which symbols in your watchlist are in/near a zone.
- When you change the chart timeframe, the scanner recomputes all symbols on the new TF.
- When you switch the chart to a symbol from the list, you see its zones rendered as boxes directly on the chart.
Limitations
- Pine Script enforces a hard limit of 40 unique request.security calls per indicator — hence the 40-symbol cap. Empty slots are mapped to the chart symbol and
deduplicated, so the actual call count depends on how many distinct tickers you populate.
- Zone boxes are drawn only for the active chart symbol (price-axis scaling makes cross-symbol overlay meaningless).
- With breakPct=0 and useWicks=true, zones have a short life (a single wick touch invalidates them) — the WAS_IN status acts as a follow-up signal in that mode.
Tip: For longer-lived zones, raise breakPct to 50–100% — IN/NEAR statuses will then persist as long as price holds the zone. For a classic S&D screener, the
recommended combination is useWicks=true + breakPct=0 + wasInLookback=10.
Chỉ báo Pine Script®






















