Spread Guardian
- インディケータ
- バージョン: 1.0
- アクティベーション: 5
Spread Guardian is a professional broker execution auditing utility designed to monitor and log real-time Bid/Ask spreads and volatility directly on your chart.
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 Guardian provides complete empirical transparency regarding your actual trading costs.
### KEY FEATURES
* Tick-by-Tick Monitoring: Audits every incoming price tick and automatically normalizes 3- and 5-digit broker pricing into fractional pips.
* 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: Writes structured hourly audit logs (Average Spread, Peak Spread, Minimum Spread, and Standard Deviation) directly to the MQL4/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: Completely removes all visual objects and shuts down background timers upon indicator removal, leaving no orphaned elements on your workspace.
### ON-SCREEN HUD BREAKDOWN
1. Current Spread: Exact real-time spread of the incoming quote in pips.
2. Historical Benchmark: Historical average spread recorded for the current trading hour across the lookback period.
3. Session Volatility (σ): Standard deviation indicating quoting turbulence within the active hour. Elevated readings alert you to severe slippage risk prior to order entry.
4. 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, and commodities.
* Zero External Dependencies: Built purely with native MQL code. Does not require DLL imports or external wrappers.
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 Guardian provides complete empirical transparency regarding your actual trading costs.
### KEY FEATURES
* Tick-by-Tick Monitoring: Audits every incoming price tick and automatically normalizes 3- and 5-digit broker pricing into fractional pips.
* 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: Writes structured hourly audit logs (Average Spread, Peak Spread, Minimum Spread, and Standard Deviation) directly to the MQL4/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: Completely removes all visual objects and shuts down background timers upon indicator removal, leaving no orphaned elements on your workspace.
### ON-SCREEN HUD BREAKDOWN
1. Current Spread: Exact real-time spread of the incoming quote in pips.
2. Historical Benchmark: Historical average spread recorded for the current trading hour across the lookback period.
3. Session Volatility (σ): Standard deviation indicating quoting turbulence within the active hour. Elevated readings alert you to severe slippage risk prior to order entry.
4. 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, and commodities.
* Zero External Dependencies: Built purely with native MQL code. Does not require DLL imports or external wrappers.
