Spreads and Slippage: How Execution Costs Affect Automated Strategies
Spreads and slippage are the two costs every automated strategy pays before a single pip of profit, and both are invisible in most broker marketing and default backtest settings. The spread is the gap between the bid and the ask; slippage is the difference between the price you requested and the price you got. Together they decide whether a profitable-looking backtest survives its first month live. This guide explains how each cost forms, how it damages expert advisors — especially scalping and gold — and how to measure and manage it, while the broker for EA guide covers the account setup.
What spreads and slippage mean in execution
Every instrument trades at two prices — the bid you sell at and the ask you buy at — and the difference is the spread. On major pairs a raw ECN spread is commonly 0.1 to 0.3 pips, while a market maker might quote 1 pip or more. You enter at the ask and price must move through the spread before you break even, so it is a cost on every trade — and for an EA it repeats thousands of times, turning small average differences into large annual ones.
Slippage is different: the gap between the price you asked for and the price you filled at. Market orders fill at the best available price at execution, and the gap between signal and fill is slippage. It can be positive or negative, but on average it costs: you usually chase price on entry and run from it on exit. Automation cannot wait, negotiate or decline a bad fill, so both costs hit machines harder than humans.
Spreads and slippage: causes and conditions
Three conditions cause most of it. High-impact news: inflation reports, rate decisions and employment data move prices several pips in seconds, spreads widen as liquidity providers pull quotes, and orders queue up — execution collapses at exactly the moment a volatility-triggered EA is most likely to trade. Low liquidity: outside the London–New York overlap, fewer participants mean every order pushes price further. And market gaps: when a market reopens after the weekend, or politics moves a currency between sessions, price can skip over your stop entirely and fill you at the next available price.
Regulators take execution seriously: under MiFID II firms must obtain the best possible result for clients, and the European Securities and Markets Authority and the Financial Conduct Authority both publish execution and disclosure guidance — so a broker’s execution statistics are worth asking for.
Spreads and slippage: how they affect expert advisors
An EA executes the same logic thousands of times with no discretion, so fixed costs compound instead of being absorbed. Scalping is the clearest example: a strategy targeting 10 pips on a 1-pip spread pays 10% of its target before the trade starts, and 2 pips of slippage consumes another 20%. Add a spread spike and the trade that backtested at +3 fills at -4. Strategies with wider stops absorb these costs far better — one reason slow systems survive where fast ones die.
Gold deserves special attention: XAU/USD carries a wider spread than the major pairs, its per-lot value is far larger, and it is prone to gap openings that stop out weekend positions at the worst price. A gold EA backtested without spread modelling routinely fills dollars worse than the tester suggested. The gold trading guide covers the specifics; in short, gold EAs need wider spread and slippage assumptions in strategy logic and risk sizing.
Spreads and slippage: backtest versus live
Most backtesters default to bid-only prices, zero or fixed spread and no slippage, so the strategy earns the theoretical mid-price. The equity curve looks beautiful; live fills happen one spread and several pips worse, every time: fewer trades, because marginal signals no longer clear the higher cost bar, lower average wins, higher average losses and a drawdown that arrives earlier than predicted. The backtest is not useless; it is a ceiling, not a floor.
The fix is a three-stage check. Model the spread and average slippage per trade so the equity curve reflects real costs. Forward test on a demo that mirrors the live spread model — a demo with perfect fills tells you nothing. Then compare the first month live: if trade count and average win sit within roughly 10–15% of the forward test, costs are under control; if not, the broker, the timing or the strategy needs review.
Measuring and managing spreads and slippage
Both costs are measurable, and measurement is the first management step. Spread is easy: most platforms display the live bid and ask, and a simple EA script can log the spread at every signal and fill. Slippage requires logging requested and filled prices for every order — MT4 and MT5 store fills in account history, and the EA should log both to compare average drift with the backtest assumption. If trades cluster around news windows, reschedule them; if the broker’s spread widens at fixed hours, note the pattern. The broker for EA guide covers spread consistency, execution speed and the testing routine that reveals them.
Three rules manage the rest. Trade the liquid sessions. Avoid scheduled news windows unless the strategy explicitly trades them — and if it does, size positions for the widening. Prefer limit entries over market orders wherever the strategy allows, because a limit order caps your worst-case price. None of this removes the cost; it converts it from a surprise into a budgeted line item — the conversion that separates a strategy that survives from a backtest that flatters. For the full deployment workflow, see the automation playbook.
Frequently asked questions about spreads and slippage
What is the difference between spread and slippage?
The spread is the gap between the bid and ask prices at the moment of execution; it is a known, predictable cost paid on every trade. Slippage is the difference between the price you requested and the price you actually filled at, and it varies with market conditions. Spreads are visible before you trade; slippage only becomes visible after the fill.
Why does my EA suffer more slippage than my manual trading?
An EA has no discretion: it trades on a fixed signal, around the clock, regardless of liquidity, news or spread state, while a manual trader waits for calmer conditions. Automation also reacts within milliseconds, so it is often filled exactly when the market is moving fastest. Slippage becomes concentrated in the trades your strategy is least able to absorb.
Do backtests include spreads and slippage?
Only if you configure them to. Many backtesters default to bid-only prices, a fixed spread and zero slippage, which flatters results. Model the spread and an average slippage per trade in the tester, then forward test on a demo that mirrors the live spread model, and compare trade count and average win with live results before going live.
How can I reduce slippage on my automated strategy?
Trade the liquid London–New York session, avoid high-impact news windows unless the strategy is designed for them, prefer limit entries over market orders and choose a broker with consistent execution; the broker guide covers how to test this. Slippage will never disappear, but it can be converted from an unknown into a measured, budgeted cost.
Budget the costs before the market bills you. Follow the automation playbook for the execution checks, broker testing routine and deployment checklist that keep these costs inside the plan.
Risk disclosure: Trading foreign exchange, commodities, CFDs and cryptocurrencies carries a high level of risk and may not be suitable for all investors. Past performance is not indicative of future results. AlgoTM provides trading tools and technology only and does not provide investment advice, portfolio management or guaranteed returns.