Skip to content

MetaTrader 5

Slippage in Trading: Causes, Requotes and How to Measure It

Slippage in trading is the difference between the price you expected an order to fill at and the price it actually filled at. Negative slippage is a worse fill, such as paying more on a buy; positive slippage is a better one. Slippage happens because prices move between the decision and the execution, and because liquidity at the quoted price is limited. Market and stop orders can slip. Limit orders fill at their price or better, or may not fill.[1][2]

In a TradingView-to-MetaTrader 5 workflow, the first decision is which price counts as "expected". This guide is part of the trading mechanics library: orders, lots, margin and costs.

Illustrative cover for slippage in trading: an expected price line and a fill marker offset from it, with the official PineConnector logo.
Slippage is measured from a reference price you define to the price the broker actually filled.

Slippage at a glance

  • Definition: in TradingView's words, "the disparity between the expected fill price of an order and the actual fill price".[1]
  • Sign used here: positive means a better fill than the reference; negative means a worse fill.
  • Orders that can slip: market orders, triggered stop orders and stop losses. Limit orders fill at their price or better, or not at all.[2]
  • Where to read the fill: the deal's Price in the MT5 Toolbox History tab.[2]
  • Related MT5 terms: execution mode, Deviation and Requote (trade server return code 10004).[3][6]
  • In a TradingView backtest: the strategy's Slippage property, a fixed number of ticks.[8]

How is slippage calculated?

Slippage on a buy = reference price − fill price. Slippage on a sell = fill price − reference price.

  • Reference price: the price you expected. Manually, that is the price in your order. In automation, choose it in advance, such as the bar close that triggered the alert.
  • Fill price: read the deal’s Price in MT5 History. If one order produces several deals, match their Order ticket and calculate the volume-weighted price of those deals. Do not substitute the current position’s average entry price, which can include earlier orders.[2]
  • Sign: the sign is kept so that "positive slippage" means a better price. Many reports show slippage as a positive cost instead, so state your convention.

Divide the price difference by the pip size (0.0001 for EURUSD) to get pips. Multiply pips by the pip value per 1.00 lot and by the lots traded to get money. For EURUSD with a 100,000 contract, the pip value per 1.00 lot is 0.0001 × 100,000 = 10 USD. Contract size is broker-specific; the pips and pip value guide covers other symbols.

Worked example: a TradingView alert that became an MT5 deal

Illustrative numbers, not a recommendation or a measured result. A strategy sends a buy alert for EURUSD at an H1 bar close. The account is in USD, the order is 0.10 lot and one pip is 0.0001.

  • Alert reference price: the signal bar's close on the TradingView chart, 1.10000.
  • Broker quote when the request arrived: bid 1.10010, ask 1.10020.
  • Deal price in MT5 History: 1.10025.

The alert-to-fill difference is 1.10000 − 1.10025 = −0.00025, or −2.5 pips, in three parts:

  1. Quote drift and feed difference: the broker's bid is 1.10010 − 1.10000 = 0.00010 above the chart close, 1.0 pip against the buyer.
  2. Spread: a buy fills at the ask, and 1.10020 − 1.10010 = 0.00010, another 1.0 pip.
  3. Execution slippage against the broker's quote: 1.10020 − 1.10025 = −0.00005, or −0.5 pip.

The parts add up: −1.0 − 1.0 − 0.5 = −2.5 pips. At 10 USD per pip per 1.00 lot, 0.10 lot is 1 USD per pip. The whole gap costs 2.50 USD, of which 0.50 USD is slippage in the narrow sense. Splitting the parts needs the broker's bid and ask at request time; the alert and deal prices alone give only the total.

Illustrative price ladder for a EURUSD buy: chart close 1.10000, broker bid 1.10010, broker ask 1.10020 and deal 1.10025, splitting a 2.5-pip gap into drift, spread and execution slippage.
Illustrative numbers, not measured results. Only the last step is slippage against the broker's own quote. The full gap is what the fill cost relative to the alert.

Three illustrative trades show why one fill is not enough:

  1. Buy, alert 1.10000, deal 1.10025: 1.10000 − 1.10025 = −0.00025, or −2.5 pips.
  2. Sell, alert 1.10200, deal 1.10190: 1.10190 − 1.10200 = −0.00010, or −1.0 pip.
  3. Buy, alert 1.10100, deal 1.10095: 1.10100 − 1.10095 = +0.00005, or +0.5 pip.

The average is (−2.5 − 1.0 + 0.5) ÷ 3 = −1.0 pip per fill, and the worst is −2.5 pips. Trade 3 is positive slippage: the buy filled below the alert price.

Why does the MT5 fill differ from the TradingView alert price?

  • Timing. By default a strategy's orders fill in TradingView's broker emulator no earlier than the next bar's open.[1] The real order follows webhook delivery, PineConnector processing, the EA's request and broker execution; PineConnector's docs say to measure that path on your own setup.[12] TradingView notes that the delay between an alert and a live trade "can be a critical performance factor".[1]
  • Different quotes. TradingView's forex providers include ICE composites and individual brokers.[10] Your MT5 broker quotes its own prices, which can differ in feed, bid and ask, spread and timestamps.[11] See why TradingView prices differ from your broker's.
  • Spread. MetaQuotes states that a security is generally bought at the Ask and sold at the Bid.[3] A chart close is not your broker's ask or bid at execution; the bid-ask spread guide explains why.
  • Liquidity, volatility and size. TradingView names all three as reasons fills differ from intended prices.[1] In MT5, one order can produce several deals when one market offer does not cover the volume.[2] The filling policy (FOK, IOC or Return) decides what happens to the rest.
  • Gaps. MetaQuotes describes triggered stop orders as filling at the specified price or worse, so a jump past a stop fills beyond it.[2] See weekend gaps and the market open.

Requotes, deviation and MT5 execution modes

MetaTrader 5 has four execution modes, and the broker sets one for each symbol.[3] The symbol's Specification window shows it in the Execution field.[4]

  • Instant Execution: the terminal attaches current prices to the order. If the broker does not accept them, it sends a requote with new prices.[3] Within the order's Deviation, the order executes at the new price without notification; beyond it, the dealer can refuse and offer new prices.[2]
  • Request Execution: prices are requested first, then the order is confirmed or rejected.[3]
  • Market Execution: the broker decides the price, and sending the order "means advance consent to its execution at this price".[3]
  • Exchange Execution: orders go to an external trading system at the prices of current market offers.[3]
Illustrative comparison of the four MT5 execution modes, Instant, Request, Market and Exchange, showing who sets the price and where deviation and requotes apply.
Summary of MetaQuotes' descriptions. The broker sets the execution mode for each symbol; check it in the symbol's Specification window.

A larger deviation makes requotes less likely and accepts larger price changes silently.[2] For Expert Advisors, MQL5 defines deviation as "the maximal price deviation, specified in points". It is a required field for Instant and Request Execution only; Market and Exchange requests need no price or deviation.[5] An EA receives a requote as return code 10004, while 10020 means "Prices changed".[6]

PineConnector's EA Errors page lists Requote as a case to check against the quote and execution mode, and says to confirm whether any order was placed before retrying.[16] The published EA settings list no deviation or maximum-slippage input as of 25 September 2026.[17] Other requote handling is not documented; test on demo.

How to measure slippage on each automated trade

  1. Fix the reference price first. For a bar-close indicator alert, use the signal bar's close; {{close}} holds the value of the bar on which the alert triggered. For a strategy's order-fill alert, {{strategy.order.price}} is the emulator's fill price.[9] The strategy report's List of trades shows each simulated entry and exit price.[1]
  2. Find the alert and the signal. TradingView's Alerts log shows the event's time and message. PineConnector's Signals log shows the received message, status and timestamps; a received signal is not proof of a fill.[13]
  3. Find the MT5 deal. In the History tab, read the deal's Price, Time and Order ticket. Group only deals belonging to that order when calculating its weighted fill price.[2] With the default PineConnector comment, the order or position comment carries the Signal ID.[13]
  4. Calculate the signed result in pips and money. Where the server provides it, the Cost column shows the deal's cost against the mid-point price, which MetaQuotes calls the amount lost on the traded spread.[2]
  5. Log every fill, exits included, and review the average and worst by symbol and session against your backtest assumption.

Match clocks first. TradingView's {{time}} and {{timenow}} are UTC.[9] MT5 History uses the broker's server time, recorded as YYYY.MM.DD HH:MM.[2] See broker server time, UTC and TradingView time, and the demo verification walkthrough for the same chain of records.

How to include slippage in a TradingView backtest

By default, TradingView's broker emulator fills orders from the chart's data, not your broker's quotes. The slippage argument of strategy(), or the Slippage property, is a fixed number of ticks, default 0, applied in the unfavourable direction.[1] The Help Center applies it to market and stop orders and says it "can be used to account for the spread".[8]

Slippage in ticks = measured slippage in pips × pip size ÷ tick size

Illustrative conversion: the three trades averaged −1.0 pip. With a tick size of 0.00001, 1.0 × 0.0001 ÷ 0.00001 = 10 ticks per fill. Read the tick size in the strategy report's Symbol info.[1] An alert-to-fill figure already includes spread, so do not count spread twice.

  • A constant is a simplification. TradingView calls slippage "dynamic and unpredictable" and warns that constant slippage can place fills outside the candle.[1] A second run with your worst observed value shows how sensitive the result is.
  • Positive slippage is not modelled. The setting only worsens fills.
  • The MT5 Strategy Tester tests MQL5 EAs, not TradingView alerts. Its "No Delay" mode fills at requested prices without requotes, which MetaQuotes calls "ideal" conditions. With a delay, an EA in Instant Execution can receive a requote.[7] See MT5 Strategy Tester modelling modes.

Related: the full cost of a trade, why TradingView and MT5 backtests differ and the backtesting guide.

Which order choices limit slippage, and what does each cost?

Demo test only. Confirm every account sharing the selected License ID is a demo account before creating the alert. These messages request broker trades. Choose your own symbol, size and rules, check the exact symbol and permitted volume, and add your configured secret= if required. The examples are not instructions to place a live trade.[19]

  • Limit orders cap the price but may not fill. MetaQuotes says limit orders execute at the specified price or better, but execution is not certain.[2] PineConnector documents buylimit and selllimit commands.[15] Illustrative message for the TradingView alert's Message field: LicenseID,buylimit,EURUSD,vol_lots=0.01,entry_price=1.09500,sl_pips=20 (lots, entry price, stop in pips).
  • Stop-limit orders trade slippage for fill risk. MetaQuotes describes them as the way to set a stop order and limit the slippage.[2] PineConnector's pending commands are buy stop, buy limit, sell stop and sell limit; a stop-limit command is not documented.[15]
  • A spread filter checks the spread, not the fill. PineConnector's spread= sets a maximum entry spread, (Ask − Bid) ÷ pip size when the alert arrives. Illustrative message: LicenseID,buy,EURUSD,vol_lots=0.01,sl_pips=20,spread=2 (maximum 2 pips). Passing it is not a confirmed order.[14]
  • When to trade is a strategy decision. Thin liquidity and volatile markets are the conditions TradingView links to slippage;[1] this page does not recommend avoiding or seeking them.

Automation sends the orders your rules describe. It does not remove slippage or choose the order type. Compare types in the order types guide.

Common mistakes when reading slippage

  • Calling the whole alert-to-fill gap slippage. In the example, 2.0 of the 2.5 pips were drift and spread.
  • Mixing sign conventions. "+2.5" in one report may mean a 2.5-pip cost.
  • Treating a stop-loss level or loss limit as a maximum loss. MetaQuotes describes triggered stop orders as filling at the specified price or worse.[2] For its account-protection limits, PineConnector's EA guide says to allow for slippage between a threshold and the final result.[17]
  • Recording only bad fills. In 2018, ESMA warned that providers may pass slippage losses to clients while keeping slippage gains, which it calls asymmetric slippage.[18] A two-sided log is your evidence.
  • Judging from a few trades, or assuming demo fills match live ones.

Frequently asked questions

What is slippage?

Slippage is the difference between the price a trader expected an order to fill at and the price it actually filled at. A worse fill, such as a higher price on a buy, is negative slippage. A better fill is positive slippage. It mainly affects market orders, triggered stop orders and stop losses, which execute at the price available at that moment.

What is a requote in trading?

A requote happens in MetaTrader 5's Instant Execution mode when the broker does not accept the requested price and returns new prices instead. In the terminal, the trader can accept or reject them. An Expert Advisor receives trade server return code 10004, TRADE_RETCODE_REQUOTE. The order's Deviation setting decides how large a price change is filled without a requote.

How much slippage is normal in forex?

There is no universal normal figure for forex slippage. It depends on the broker, the symbol's execution mode, the time of day, liquidity, news and order size. The reliable number is one measured on your own account: compare each reference price with the MT5 deal price over many trades, and record both the average and the worst fill.

What is positive slippage?

Positive slippage is a fill at a better price than expected: a buy below the reference price, or a sell above it. It can happen when the price moves in the trader's favour before execution, and limit orders fill at their price or better. Whether favourable moves are passed on depends on the broker's execution, which ESMA has discussed as asymmetric slippage.

Can a stop loss slip?

Yes, a stop loss can slip. In MetaTrader 5, stop loss levels are held and triggered on the broker's server, and the resulting close uses the Bid or Ask available at that moment. MetaQuotes describes stop orders as filling at the specified price or worse, so a gap or a fast market can close the position beyond the stop level.

Reviewed 25 September 2026. Facts were checked against the linked sources on that date. Nothing in this article was tested on a trading account.

Related reading

Sources

  1. TradingView – Pine Script User Manual: Strategies, accessed 25 September 2026.
  2. MetaQuotes – MetaTrader 5 Help: Trading operations, accessed 25 September 2026.
  3. MetaQuotes – MetaTrader 5 Help: Basic principles (types of execution), accessed 25 September 2026.
  4. MetaQuotes – MetaTrader 5 Help: Market Watch and symbol specification, accessed 25 September 2026.
  5. MQL5 Reference – Trade request structure (MqlTradeRequest), accessed 25 September 2026.
  6. MQL5 Reference – Return codes of the trade server, accessed 25 September 2026.
  7. MetaQuotes – MetaTrader 5 Help: Strategy testing, accessed 25 September 2026.
  8. TradingView Help Center – Strategy properties, accessed 25 September 2026.
  9. TradingView Help Center – How to use a variable value in alert, accessed 25 September 2026.
  10. TradingView Help Center – What is the difference between ICE and other forex providers?, accessed 25 September 2026.
  11. PineConnector – Frequently asked questions: price differences, accessed 25 September 2026.
  12. PineConnector – Frequently asked questions: latency, accessed 25 September 2026.
  13. PineConnector – Frequently asked questions: Signals log, Signal ID and Alerts log, accessed 25 September 2026.
  14. PineConnector – Syntax: spread filter, accessed 25 September 2026.
  15. PineConnector – Syntax: pending commands, accessed 25 September 2026.
  16. PineConnector – EA Errors: MT5 return details, including Requote, accessed 25 September 2026.
  17. PineConnector – EA settings, including Account protection, accessed 25 September 2026.
  18. ESMA – Additional information on the agreed product intervention measures relating to CFDs and binary options (27 March 2018), accessed 25 September 2026.
  19. PineConnector – Test your setup: demo account and License ID scope, accessed 25 September 2026.

PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.


Leave a comment

Back To PiCo Blog

Ready when your strategy is

You bring the strategy.We bring the infrastructure.

Connect TradingView to MetaTrader, choose where MT5 runs and put the full PineConnector workflow through its paces from your first month.

Strategy and trading decisions remain yours. The MT5 environment can be ours.

PineConnector Edge

Run the full PineConnector workflow.

$59/mo at launch

Core plan · 1 connection · 1 hosted MT5 environment

Start with Core

Launch price — standard pricing is $69/mo after the launch period.