Spread Sentinel
- インディケータ
- バージョン: 1.0
- アクティベーション: 5
Spread Sentinel is a professional broker execution auditing utility designed to monitor and log real-time Bid/Ask spreads and volatility directly on your chart, now fully optimized for the MetaTrader 5 (MT5) multi-threaded environment.
While brokers often advertise fixed or typical tight spreads, true market execution costs fluctuate continuously during liquidity shifts, major macroeconomic releases, and daily rollover windows (21:00–23:00 GMT). Spread Sentinel provides complete empirical transparency regarding your actual trading costs, safeguarding your capital against sub-optimal execution conditions.
KEY FEATURES
-
Tick-by-Tick Monitoring: Audits every incoming price tick and automatically normalizes 3- and 5-digit broker pricing into fractional pips on any MT5 asset class.
-
Online Welford Recurrence Algorithm: Calculates real-time mean spread and running standard deviation (volatility) in microsecond execution time, eliminating RAM bloat and chart lag.
-
24-Hour Diurnal Benchmarking: Builds an empirical multi-day baseline for each hour of the trading day (hours 0 to 23) using the last N days (configurable, 10 days by default).
-
Anomaly & Spike Detection: Instantly reveals when current execution costs deviate significantly from historical averages for that specific hour.
-
Automated CSV Logging & Archival (MT5 Sandbox): Writes structured hourly audit logs (Average Spread, Peak Spread, Minimum Spread, and Standard Deviation) directly to the MQL5/Files sandboxed directory for external analysis in Excel, Python, or R.
-
Dual Synchronized Clocks: Displays broker server time alongside Greenwich Mean Time (GMT) directly on the chart HUD.
-
Clean Chart Deinitialization: Fully utilizes MT5 OnDeinit event handlers to completely remove all visual objects and shut down background timers upon indicator removal, leaving no orphaned elements on your workspace.
ON-SCREEN HUD BREAKDOWN
-
Current Spread: Exact real-time spread of the incoming quote in pips.
-
Historical Benchmark: Historical average spread recorded for the current trading hour across the lookback period.
-
Session Volatility (σ): Standard deviation indicating quoting turbulence within the active hour. Elevated readings alert you to severe slippage risk prior to order entry.
-
Time Displays: Synchronized broker server time and universal GMT.
INPUT PARAMETERS
-
InpColorLabels: Chart HUD text color (Default: Yellow).
-
InpFontSize: Font size for primary spread readouts (Default: 10).
-
InpDaysToAverage: Historical lookback window in days used to compute the hourly baselines (Default: 10).
RECOMMENDATIONS FOR USE
-
Timeframe Requirement: Attach to an H1 chart. The internal bar-close triggers, daily CSV compilation, and hourly baseline buckets rely on H1 bar synchronization.
-
Multi-Asset Compatibility: Functions seamlessly on Forex pairs, spot metals (Gold/Silver), indices, commodities, and any custom instruments supported by your MT5 broker.
-
Zero External Dependencies: Built purely with native MQL5 code. Does not require DLL imports or external wrappers. Compatible with cloud-based or VPS environments.
