Feed Sanitizer
Guards your server against bad upstream quotes and stale or frozen feeds: filters price spikes, crossed markets, spread blowouts, and silent LP feeds with fail-closed order protection.
What it does
12 capabilities- Filters single-tick price spikes with per-symbol jump overrides
- Anti-deadlock confirmation (confirm_ticks) and reference expiry for real gaps
- ECN zero-spread support (allow_zero_spread) while rejecting inverted/zero/NaN quotes
- Per-symbol spread blowout limits with explicit =0 exemptions
- True tick drop (action=drop), clamp, alert_only, and pause_only modes
- Stale quote detection with per-symbol max_quote_age overrides
- Frozen LP keepalive detection (max_unchanged_seconds) and recovery_ticks hysteresis
- Trading session schedule prevents false stale alerts during market close
- Fail-closed new-order protection that always permits closing orders
- Dry-run mode reports actions without mutating ticks or rejecting orders
- Zero-allocation hot path with bounded single-map symbol state
- Records feed_anomalies and stale_quotes reports with alert cooldown
How it works
Built for liquidity providers and brokers distributing quotes to institutional or retail clients. Feed Sanitizer inspects every incoming tick on the quote thread for single-tick price spikes (with per-symbol thresholds, N-tick gap confirmation, and reference expiry to prevent permanent lockouts on real market gaps), non-positive or crossed markets (with ECN zero-spread support), and per-symbol spread blowouts. It also monitors quote freshness and frozen LP keepalive feeds with trading-session awareness and recovery hysteresis, absorbing all Quote Watcher capabilities into one conflict-free guard. Bad ticks can be clamped to the last good quote, dropped outright via HookTick cancel, or logged in alert-only or dry-run mode. New client orders on affected or stale symbols are paused fail-closed while closing orders are always allowed.
Parameters & options
Configured directly in MetaTrader 5 Administrator and testable live in the simulator.
| Parameter | Type | Default | Description |
|---|---|---|---|
symbols | text | * | Symbols to guard, comma separated; wildcards allowed, for example EUR*,XAUUSD. * means all |
groups | group mask | * | Client groups whose orders are paused on feed anomalies or stale feeds (MT5 group mask). * means all |
max_jump_percent | number | 5.00 | Default maximum single-tick mid-price jump in percent (two decimals). 0: spike check off |
symbol_max_jump | text | empty | Per-symbol jump percent overrides, semicolon separated, for example BTCUSD=10.00; EURUSD=1.50; XAU*=0. 0 disables for that symbol |
confirm_ticks | int | 3 | Consecutive ticks agreeing on a new price level before accepting it as reference. 0: off, or 2 to 1000 |
max_ref_age_seconds | int | 60 | Seconds after which the reference quote expires so genuine gaps are accepted. 0: never expires |
fix_crossed | bool | 1 | 1: flag inverted/crossed quotes as anomalies (non-positive and non-finite prices are always rejected). 0: ignore crossed quotes |
allow_zero_spread | bool | 1 | 1: allow zero-spread ECN quotes where bid == ask. 0: require ask > bid |
max_spread_points | text | empty | Maximum allowed spread in points per symbol, semicolon separated, for example EURUSD=50; XAU*=200; *=100. =0 disables for that symbol |
pause_seconds | int | 30 | Seconds to reject new orders on a symbol after a feed anomaly. 0: no anomaly order pause |
action | text | clamp | clamp: replace bad ticks with last good quote (or drop if none). drop: cancel bad ticks. alert_only: log/alert only. pause_only: pause orders without changing ticks |
max_quote_age | int | 0 | Default seconds without a fresh quote before marking a symbol stale. 0: stale check off |
symbol_max_age | text | empty | Per-symbol max quote age in seconds, semicolon separated, for example EURUSD=10; XAU*=30; BTCUSD=0. =0 disables for that symbol |
max_unchanged_seconds | int | 0 | Seconds of identical bid/ask keepalive ticks before marking a symbol frozen. 0: frozen check off |
recovery_ticks | int | 2 | Consecutive valid fresh ticks required before a stale or frozen symbol recovers |
sessions | text | empty | Trading session schedule for stale/frozen checks, for example mon-fri 00:00-24:00. Empty: always active |
block_orders_on_stale | bool | 0 | 1: reject new orders on stale or frozen symbols (closing orders are always allowed). 0: alert only |
alert_cooldown_seconds | int | 60 | Minimum seconds between repeated alerts and anomaly rows for the same symbol |
dry_run | bool | 0 | 1: log and record what would be clamped, dropped, or blocked without mutating ticks or rejecting orders. 0: enforce |
license_key | text | empty | License key from FXOpsPro, for example FXO-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX |
license_server | text | https://plugins.fxopspro.com | License server address |
Release history
- v2.0.0Latest2026-11-24
Merged Quote Watcher capabilities (max_quote_age, symbol_max_age, max_unchanged_seconds, recovery_ticks, sessions, block_orders_on_stale); added fail_closed=true, action=drop, confirm_ticks and max_ref_age_seconds anti-deadlock, allow_zero_spread, symbol_max_jump, alert_cooldown_seconds, dry_run, clock-skew guard, and fixed =0 spread override fallthrough.
- v1.0.12026-11-22
Stability updates and expanded unit and simulator test coverage.
- v1.0.02026-11-21
First release: spike filter, crossed-quote guard, spread blowout circuit breaker, clamp and pause_only modes, per-symbol execution cooldown.
Liquidity provider



