Spread Filters for Gold EAs: Cutting Bad XAUUSD Fills
Camovia Tray Team · 2026-10-11
Let me start with something you already know but might not have quantified. If you run a gold EA, you have probably seen this pattern: the strategy looks solid in backtest, the logic is clean, the signals are rational, and then live results come in and something is off. Not catastrophically off. Just enough to erode the edge. A few bad fills here, a slippage event there, a stop that gets hit at a price you never planned for. You check the trade log and the signals fired exactly when they should have. The problem is not the signal. The problem is the execution environment at the moment that signal fired.
This is the part of algorithmic trading that does not get enough airtime. Everyone obsesses over entry logic, indicator parameters, optimization runs. But for XAUUSD specifically, the spread at the moment of entry can be the difference between a profitable trade and a structural loss. And the worst part is that your backtest almost certainly did not model it.
现象:黄金点差不是一个数字,它是时间的函数
Here is the factual starting point. On a decent ECN broker, XAUUSD spreads during London-New York overlap run roughly 15 to 35 cents, or 15 to 35 pips depending on how your broker quotes it. That is the good window. Outside that window, things change.
During the Asian session, spreads widen. During the 20:00 to 01:00 UTC window, liquidity drains noticeably and spreads expand further. And then there is the rollover window, typically around 21:00 to 22:00 UTC depending on your broker, when liquidity goes nearly dead for a few minutes. Gold spreads can jump from their normal 2 to 3 pips to 10, 20, even 30 or more pips in that window.
News events are worse. CPI, NFP, FOMC. I have seen spread spikes on gold reach 20 to 35 pips that last 10 to 15 seconds. In extreme cases documented by traders, gold spreads hit 400+ points during abnormal conditions. Those spikes do not last long. But they last long enough.
And here is the critical detail: your EA does not know the difference between a signal and a spread spike. It sees a price. It checks a condition. It fires. The spread that exists at that exact millisecond is what you pay.
背后逻辑:点差过滤的真正作用是给 EA 一个“不下单”的理由
Most EA developers think about entry conditions. When should the EA buy? When should it sell? The spread filter is the inverse. It defines when the EA should do nothing. And for gold, that boundary might be the most important parameter you set.
The implementation is almost trivial. Before any entry logic runs, check the current spread. If it exceeds your threshold, return. Do not evaluate the signal. Do not check the conditions. Just skip the tick entirely. The code looks like this:
int liveSpread = (int)SymbolInfoInteger(_Symbol, SYMBOL_SPREAD);
if(liveSpread > MaxSpreadPoints)
return; That is it. Four lines. But what those four lines prevent is not trivial.
A gold EA that fires during a 30-pip spread is entering a trade that starts 30 pips in the hole. If your target is 50 pips, you need 80 pips of movement to break even. If your stop is 30 pips, you are already stopped out by the spread alone. The signal might have been perfect. The execution made it irrelevant.
This is why the max spread gold ea concept matters more for XAUUSD than for almost any other instrument. EURUSD spreads during normal hours might run 1 to 2 pips. A bad fill costs you an extra pip. Gold spreads during rollover can run 20 to 30 pips. A bad fill there costs you ten times more. The asymmetry is brutal.
The question then becomes: what number do you actually set? This is where most people get it wrong. They copy a number from a forum post. They set 30 points because someone said 30 was safe. But the right threshold depends on three things: your broker’s normal spread profile for gold, your strategy’s timeframe and target size, and the specific hours you are willing to trade.
For most gold EAs running on M15 or H1 timeframes, a threshold somewhere between 30 and 50 points (3 to 5 pips on a standard 5-digit gold quote) is a reasonable starting point. But you need to validate it against your own broker’s data. Pull two to four weeks of spread logs. Compute the 95th percentile spread per minute of the day. Find where the distribution blows out. That is your danger zone. That is where your filter needs to be active.
对从业者的启发:过滤是必要条件,不是充分条件
Here is the uncomfortable truth that experienced EA developers eventually accept: a spread filter does not improve a bad strategy. It cannot create an edge. What it does is prevent a good strategy from being destroyed by bad execution.
If your gold EA has a genuine edge, spread filtering will help preserve it. If it does not have an edge, no amount of filtering will save it. The filter is a cost-control mechanism. It ensures that when the strategy does work, the execution environment does not eat the profit.
But there is a second-order problem that spread filters alone cannot solve. Once you deploy a filtered EA, how do you know the filter is actually working? How do you know it is not blocking the right trades while letting the wrong ones through? The only way to know is to watch. To see the spread in real time. To correlate your EA’s entry log with the spread conditions at each entry timestamp.
This is where the monitoring layer becomes relevant. An EA can be told to skip trades when spread exceeds a threshold. But the person running that EA still needs visibility into what that threshold is doing in practice. Which trades got blocked. Which hours are consistently problematic. Whether the 30-point threshold is actually the right number for this broker, this account, this strategy.
If you are running your MT5 or MT4 with Camovia Tray, the tray hover gives you exactly that visibility without forcing you to keep the terminal open in front of you. Hover the tray icon, see the live XAUUSD spread alongside your open positions, and you know in that moment whether the market is in a tradable state. The position panel shows your open gold risk at a glance, so when a spread spike does happen and your EA has positions on, you can see the floating P/L update in real time and decide whether to intervene.
The xauusd spread setting ea is a binary decision the EA makes. The human decision is whether to trust that the EA is making the right call. That requires seeing the same data the EA sees.
MT4/MT5 Tray Assistant
Silent tracking, one-click close - check quotes and manage positions right from the tray.
Download Camovia TrayFrequently Asked Questions
Do I need MT5/MT4 installed? Does the terminal need to stay open?
Yes. Camovia Tray reads quote and position data from your locally running MT5/MT4 terminal, so the terminal must be installed, running, and logged in. MT5 connects directly with no EA; MT4 needs the bundled bridge EA attached once (one-click copy in Settings, then double-click in the Navigator - see the docs).
Are my quotes and positions uploaded anywhere?
No. Quote and position data is read 100% from your local MT5/MT4 terminal and never leaves your computer. See the privacy policy for details.
Which systems and terminals are supported?
Windows 10 / 11, with MetaTrader 5 or MetaTrader 4 (installed and logged in; MT4 needs the bridge EA attached once).
Is the MT4 bridge EA safe? What do I need to enable?
Yes. The bridge EA (CamoviaBridge) is bundled with the app - it only reads quotes/positions locally and executes close commands; no DLLs, no data uploads. Closing positions requires turning on AutoTrading in the MT4 toolbar.
Online Tools
Popular Symbols Trading Hours
Open/close times, weekend hours & live market status:
Related Articles
Slippage in Trading: Why It Happens and How to Manage It
Why slippage happens—volatility, latency, thin liquidity—and how to manage it: limit orders, liquid sessions, realistic stops.
Gold Range Trading: XAUUSD Rules for Choppy Markets
A gold range trading strategy for the weeks XAUUSD goes sideways: range qualification, fade entries and exit rules, and Camovia Tray keeps levels visible.
MT5 Mobile App Download: What Nobody Tells You About Mobile Trading
Discover why the MT5 mobile app isn't a full desktop replacement. Learn smarter Windows trading with Camovia Tray.
MetaTrader 4 on Windows 10: Download, Install, Set Up
Download and install MT4 on Windows 10 safely—official source, setup steps, and a tray-based way to keep quotes and positions in view.
MT5 Market Open Time: A Complete Guide for Global Traders
MT5 market open time explained for global traders, including session hours for India and Malaysia. See how Camovia Tray helps you track quotes and manage positions from the system tray.
More Articles
3 MT4 Settings That Are Secretly Hurting Your Trading (And How to Fix Them)
Transform your MT4 with smarter settings. Check quotes & manage positions from the system tray using Camovia Tray—keep your workflow focused and private.
Is XAUUSD Open on Weekends? No - Reopens Mon, Not Sat
No: standard XAUUSD does not trade on Saturday or Sunday. It shuts about 5 AM IST Saturday on Exness and reopens Monday, so weekend gap risk is real. Camovia.
Eurex Trading Hours: A Complete Guide for Global Futures Traders
了解 Eurex trading hours 及 Eurex EURO STOXX 50 futures trading hours 的完整指南:三大交易时段、夏令时调整,以及如何用 Camovia Tray 在 MT5/MT4 上随时查看行情与管理持仓。
Which Moving Average Actually Works for Crypto Day Trading?
Discover which moving average actually works for crypto day trading—EMA, SMA, or HMA—and how Camovia Tray helps you execute your strategy without terminal noise.
MetaTrader Expert Advisors PSAR Trailing Stop: Automating Profit Protection Without the Overhead
Discover how Camovia Tray complements MetaTrader PSAR trailing stop EAs by letting you hide MT4/MT5 while automated stops run in the background—view positions and quotes from the system tray.