Spread, Commission and Slippage: Where Each Cost Hides and How to Measure Yours From Your Last 20 Trades
Spread sits in the quote, commission hits the account, slippage hides in the fill. Here is where to spot each one, and how to measure yours.

Three costs sit between a quote and your result.
The spread is built into the price you see. Commission is billed to your account. Slippage is the gap between the price you asked for and the price you got. You can read the spread off the quote before you trade, but slippage only shows up when you compare your fills with the prices you requested. To measure yours, note the bid and ask when you send each order, compare them with the fill, and average the signed gap over your last 20 trades, the review size Tradewink suggests.
General education on how trading costs work, not advice on any trade.
Spread is paid on every fill; commission and slippage depend on your broker and the market
- Spread: the gap between the buy price and the sell price. According to an MQL5 explainer on trading costs, it applies to every entry and exit, and it matters most for short-term trades and in volatile periods.
- Commission: a direct charge from the broker. The same MQL5 post says it can be billed per trade, per volume, per side or per round trip. “Per side” means you pay on entry and again on exit. A round-trip rate covers both.
- Slippage: the difference between the price you requested and the price you were filled at (MQL5).
Only the spread is there on every entry and exit. Commission depends on how your broker bills, and slippage can go against you, in your favor, or not happen at all. Investopedia calls a fill at a better price than expected “positive slippage”: it lowers what a buy costs or raises what a sale brings in.
Where each cost shows up: inside the quoted price or charged to the account
MQL5 sorts costs by where they land. Some are built into the quoted price, others are charged directly to the account, and some apply only when a position stays open past a rollover time.
| Cost | Where it lands | How you can see it |
|---|---|---|
| Spread | Built into the quoted price | Ask minus bid at the moment you order |
| Commission | Charged directly to the account | Your broker’s rate: per trade, volume, side or round trip |
| Slippage | Inside the fill price | Requested price compared with fill price |
| Overnight rollover charge, where your broker charges one | Applied when a position stays open past a rollover time | Only on positions held past that time |
You pay the costs inside the price through the price itself. That means a commission total on its own shows only part of what a trade cost.
Slippage in numbers: $100 to $102 is −2%, and a better fill is positive slippage
Investopedia defines 2% slippage as a fill 2% above or below the expected price. Its example: you place an order when a stock trades at $100 and end up paying $102 per share. That is 2% negative slippage.
To put buys and sells on one scale, give the result a sign so that a negative number always means a worse fill:
- Buy: slippage % = (requested − fill) ÷ requested × 100 → ($100 − $102) ÷ $100 × 100 = −2%
- Sell: slippage % = (fill − requested) ÷ requested × 100
Made-up mirror cases using the same round numbers:
- A buy requested at $100 that fills at $98 scores +2%. That is positive slippage.
- A sell requested at $100 that fills at $98 scores −2%.
- A fill at exactly the requested price scores 0%.
Why slippage varies: market impact, order types and how the market is run
Tradewink names three drivers of slippage:
- Market impact: your own order moving the price while it fills.
- Spread costs: the wider the gap between bid and ask when you order, the further your fill can land from the price you had in mind.
- Order types: Tradewink says a market order puts getting filled ahead of controlling the price. It also says a stop order becomes a market order once it triggers. Investopedia says a limit order can prevent negative slippage, but the order may never fill if the price never reaches your limit.
Investopedia adds that slippage is most common in volatile or low-liquidity markets.
How the market is run also matters. QuestDB’s glossary notes that slippage behaves differently in two pairs of settings:
- Centralized exchanges versus dark pools (venues that do not show orders publicly).
- Quote-driven markets, where dealers post the prices, versus order-driven ones, where buyers’ and sellers’ orders meet in a shared book.
Why backtests that trade often take the biggest hit from costs
A backtest charges each trade only the costs you give it. The Finance & Quant Society (FQS) states the rule: “The more a strategy trades, the higher the bar its raw edge must clear.” Raw edge is the average gain per trade before costs. FQS describes low-turnover strategies as often more robust to costs.
Net edge per trade = gross edge − round-trip cost (FQS). A made-up hypothetical example with round numbers:
- Case A: 10 trades × ($20 gross − $5 cost) = 10 × $15 = $150 net
- Case B: 100 trades × ($6 gross − $5 cost) = 100 × $1 = $100 net
B grosses $600, three times A’s $200. But B pays $500 in costs against A’s $50, so it nets less. Break-even is where gross edge per trade equals round-trip cost. B has $1 of room per trade, so a $1 rise in cost per trade takes it to zero. A has $15 of room.
These results are based on simulated or hypothetical performance results that have certain inherent limitations. Unlike the results shown in an actual performance record, these results do not represent actual trading. Also, because these trades have not actually been executed, these results may have under-or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated or hypothetical trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to these being shown.
Checklist: measure your own trading costs from your fill records
One trade-off comes first. Per Investopedia, a limit order can prevent negative slippage but may not fill at all if the price never reaches your limit. Measure your costs before you choose between the two.
- List each cost and where it sits. Spread, commission, slippage and any overnight rollover charge, each marked “in the quote” or “on the account,” using MQL5’s split.
- Pick one reference price and stick with it. For a market buy, use the ask you saw when you sent the order. For a market sell, use the bid. Slippage measured from that quote leaves the spread out, so log the spread (ask minus bid) next to it.
- If you measure from the midpoint or the last trade price instead, part of the spread is already inside your slippage number. Do not add the spread again.
- Tradewink counts spread costs among the drivers of slippage, so the two overlap unless you keep them apart.
- If your fill record does not show the bid and ask, write them down as you place each order.
- Score your last 20 trades. Twenty is the review size Tradewink suggests. Turn each requested-vs-fill gap into a signed percentage with the formula above, built on Investopedia’s $100/$102 example: ($100 − $102) ÷ $100 × 100 = −2% on a buy.
- Average the results, then split them.
- Count worse and better fills separately, and note the single worst one. An average can hide a few large misses behind the good fills.
- Tag each fill with its venue and market type, because QuestDB notes that slippage differs from one market structure to another.
- Compare the totals with what you expected to pay.
- Put your measured round-trip cost into any backtest. That is commission on both sides, your measured average slippage, and the spread unless your reference price already includes it. Then rerun the net-edge line. Per FQS, the more trades a strategy makes, the more cost its raw edge has to cover.
- Set a slippage tolerance last. Investopedia says some brokers let you set a maximum slippage tolerance on an order. Choose yours from steps 3–4, including the worst fills.
FAQ
Is the spread a separate fee? No. MQL5 lists it among the costs built into the quoted price, so you pay it through the price.
Sources
- https://www.investopedia.com/terms/s/slippage.asp
- https://www.mql5.com/en/blogs/post/774477
- https://financeandquantsociety.org/learn/algorithmic-and-quantitative-trading/transaction-costs-and-slippage
- https://www.tradewink.com/blog/slippage-in-trading-how-market-impact-spread-costs-hurt-execution
- https://questdb.com/glossary/slippage/

