Table of contents

Ever watched your shiny new Expert Advisor crush it in backtests, only to tank once real money’s on the line? MQL4 Slippage & Point Value is the secret villain behind many blown strategies. Brokers don’t always fill your orders at the price you asked—sometimes by a hair, sometimes by a mile—and that difference quietly drains your edge.

As Warren Buffett says, “Risk comes from not knowing what you’re doing.” If you ignore how slippage and point values work, your trades might as well be coin flips.

This guide breaks it down fast—what slippage really is, how points and pips mess with your code, and simple tricks to keep your EA honest when the market moves. Let’s plug those leaks before your next trade goes sideways.

MQL4 Slippage & Point Value


What is Slippage in MQL4

“When you hit that buy button, do you ever actually get the price you saw?” asked Ray Dawson, a senior algorithmic trader who has coded over 300 MQL4 Expert Advisors for private hedge funds. “Slippage is the ghost in the machine—almost invisible, yet expensive.”

In MQL4, slippage refers to the price discrepancy between your requested price and the actual price your broker uses to execute the order. It typically happens during rapid market volatility, especially when news drops or spreads widen in low liquidity conditions. The OrderSend function in MQL4 includes a parameter to control how much deviation is acceptable, but many newer traders ignore it—at their own cost.

Key Insights from Industry Pros:

  • “Even 2.5 pips of slippage on every trade can wipe out months of profit,” says Kathy Lien, Managing Director at BK Asset Management.

  • Brokers may fill orders at less favorable prices to protect against fast-moving markets. This is not manipulation—it is survival during volatility.

When Slippage Strikes:

When Slippage Strikes:

  • You enter trades during market opens or closes.

  • You use EAs that send orders without timing checks.

  • Your broker uses a market execution model.

Traders often confuse slippage with broker error. Yet in reality, slippage is a natural product of fast-moving price action and execution rules.

If your OrderSend code does not include flexible slippage handling, or if it assumes fixed point values without checking for digit precision, your strategy is exposed.


Point vs. Pip: What's the difference

Mixing up points and pips can drain your Forex wallet fast. Here’s how to keep them straight and make your EA bulletproof.

Pip size across forex pairs

A pip is the standard unit of measurement in currency trading, but not all pairs have the same pip value. For major pairs like EUR/USD, one pip usually equals 0.0001, while for JPY pairs, it’s 0.01. Traders should always check the pip size for minor pairs or cross pairs—one slip and your profit calculations get wrecked.

How points affect spread calculation

Points are the tiniest unit that Forex platforms use to quote prices. The spread calculation—the difference between the bid price and ask price—is usually in points, not pips.

Forex PairSpread (Points)Spread (Pips)
EUR/USD151.5
GBP/JPY202.0
AUD/USD101.0

Even a small slip in points changes your trading cost big time.

Avoiding pip-point confusion in EAs

Avoiding pip-point confusion in EAs

Don’t let your Expert Advisor crash because of a tiny pip/point mix-up. One rookie mistake is coding stop-loss or take-profit in pips but forgetting your broker wants points. Double-check your automated trading code and match the unit with your broker’s platform specs. A clean program saves real money.


How many digits does your broker use

The number of digits your broker shows isn’t random—it shapes how precise your trades are and how well your EA handles stop-loss and take-profit levels. Let’s clear this up with real broker examples.

Identifying 4-digit vs. 5-digit brokers

Financial brokers are usually classified as 4-digit brokers or 5-digit brokers based on how they quote prices. For instance:

Broker NameBroker TypeExample Quote for EUR/USD
FXTM5-digit broker1.10503
Pepperstone5-digit broker1.10508
Exness5-digit broker1.10497
FBS (Cent Account)4-digit broker1.1050
RoboForex (some fixed accounts)4-digit broker1.1051

Here’s why this matters:

  • 4-digit brokers quote major pairs like EUR/USD to four decimal places, e.g., 1.1050 → each point equals one pip.

  • 5-digit brokers go a step further: 1.10503 → the last digit is a fractional pip, so one point is one-tenth of a pip.

How to check your broker type:

  1. Log in to MetaTrader 4.

  2. Open a currency chart.

  3. Look at the Bid/Ask quotes or hover over the price scale.

  4. Count the decimals — this is your broker ID length for coding.

Getting this wrong can mess up your stop-losses and trailing stops. Correct broker identification helps avoid that headache.

Impact of digits on order accuracy

Impact of digits on order accuracy

Your EA’s order accuracy hinges on your broker’s digit style. Mix up point values and you risk losing pips you didn’t even know were slipping away.

  • On a 5-digit broker like Pepperstone or IC Markets, setting slippage = 10 means 1 pip.

  • On a 4-digit broker like older RoboForex Fixed accounts, slippage = 10 means 10 pips — massive difference!

This slip can mean a winning trade turns red. Many beginners overlook this and blame the broker for order errors, but in reality, it’s a miscalculation of digital identifiers and order processing logic.

"Digits are the unsung heroes of trade accuracy. Get them wrong, and your EA bleeds money silently." — John Smith, ex-Alpari risk manager.

Moral? Double-check your broker’s number length, and always align your EA’s point logic with it. Small digits, big impact!


Slippage settings in OrderSend

Nail your OrderSend slippage settings, and you’ll dodge a ton of trading headaches. Let’s break it down clearly.

Slippage parameter explained

The slippage parameter in OrderSend is your safety buffer. It tells the broker, “Hey, if the market price wiggles a bit, still fill my order.” For example, if your EA requests 1.2500 but the price moves to 1.2503, your slippage tolerance determines if that trade still goes through. Tight settings mean fewer bad fills but more rejections. Looser settings mean more fills but possible worse prices. Smart traders tweak this based on instrument volatility and order size.

Choosing safe slippage values

Choosing a safe slippage value isn’t rocket science, but folks often wing it. Here’s a quick cheat sheet for common scenarios:

Market ConditionSuggested Slippage (Points)Risk Level
Low Volatility (EUR/USD)1–2Low
Medium Volatility (GBP/USD)3–5Moderate
High Volatility (Gold, News)8–12Higher

Always adjust after backtesting — what works for EUR/USD at midnight may ruin trades during NFP spikes. Remember: safe doesn’t mean bulletproof — markets love surprises!

Common mistakes setting slippage

New coders mess this up a lot.

  1. Zero tolerance: Setting slippage to 0 looks precise but kills trades fast.

  2. Too generous: Allowing 50+ points might fill at crazy prices — ouch!

  3. One and done: Market moves change daily — revisit your slippage settings often to avoid nasty surprises.

One pitfall? Folks forget to test with real spread widening. Backtest it and run a demo!

Debugging OrderSend slippage errors

Slippage errors in OrderSend are sneaky but fixable.

  • Step 1: Add Print("Bid: ", Bid, " Ask: ", Ask) before sending orders.

  • Step 2: Log the slippage value and the result code.

  • Step 3: If orders keep failing, widen slippage slightly and retry.

Pro tip from experienced MQL coders: “Your logs don’t lie — trust them more than your gut when trades misfire.” If all else fails, wrap your order code in a retry loop with a smart delay. Keeps your bot calm under pressure!


Auto-detect slippage and point values

Manually tweaking slippage and point values for every broker? That’s old-school. Let your code do the heavy lifting.

Using Digits to calculate points

The Digits property tells you how many decimal places your broker uses. Use it to calculate the Point size dynamically. For example, if Digits == 5, one Point is 0.00001. This ensures price precision and correct tick value measurement, especially across different instruments.

DigitsPoint ValueTypical Use Case
40.0001Standard Forex
50.00001High-precision Brokers
30.01Yen Pairs

Scripting dynamic slippage limits

Scripting dynamic slippage limits

Slippage isn’t one-size-fits-all. Market volatility changes fast, so your slippage threshold should too.

  • Use volatility indicators to dynamically adjust limits.

  • On high-impact news: widen the tolerance.

  • Calm markets? Tighten it for sniper-like precision.

As one algo dev put it, “Hardcoded slippage is like racing a Ferrari with the parking brake on.” Smart scripting = better fills.

Handling fractional pips properly

Some brokers love to get fancy with fractional pips (like quoting EUR/USD as 1.10543). That extra digit? It’s not decoration—it’s a micro-unit of value.

  1. Always detect the tick size using MarketInfo(Symbol(), MODE_POINT)

  2. Normalize your calculations to account for fractional price differences

Miss this step, and your EA might make decisions on phantom numbers.

Auto-adjusting for broker changes

New broker? Different specs? No worries. Smart EAs can auto-detect:

  • Digits

  • Point

  • Execution mode

  • Trade allowance limits

By building flexible configuration logic, you prevent breakdowns when switching platforms. Think of it like GPS rerouting after a detour—your trading system adapts in real time.

Backtest vs. live auto-detection

Auto-detection can behave differently in Strategy Tester than in Live Trading.

  • Backtests pull from historical data with fixed parameters.

  • Live execution reads real-time quotes, which can vary.

Tip: Add logging for detected values in both modes. It’ll help you catch mismatches early before they mess with your EA's performance.


Real Slippage vs. Allowed Slippage

“Traders often think they set slippage, so they control it,” explains Dean Michaels, senior analyst at FXStreet. “Yet real slippage laughs at your settings if market chaos hits.”

Allowed slippage acts like a polite request — the number a trader writes in the OrderSend box. It tells the trade server how much price deviation is acceptable when filling a market order. Real slippage, though, happens when actual ask price or bid price jumps faster than the broker can match.

Key differences traders must remember:

Key differences traders must remember:

  • Allowed slippage = your tolerance for price wiggle room

  • Real slippage = what execution engine really delivers

  • Requote = the server rejecting too wild a price deviation

Experts at Investopedia stress: “Even a tight allowed slippage cannot fight sudden spread spikes.” That means trading around major news drops can mean huge gaps between requested and filled orders.

Traders should compare broker execution certificates, read real user reviews, and watch live fills. Only testing under live spreads reveals true real slippage behavior. Stay sharp or the market bites twice as hard.


Normalize price values in code

Messy decimals can wreck your EA’s trades.

NormalizeDouble and price rounding

NormalizeDouble and price rounding

In MQL, the NormalizeDouble function is your best buddy for rounding a price to the right precision. Imagine you’re setting a double variable for an order price: if it’s off by a micro tick, the broker might reject it or slip it. Use NormalizeDouble(value, Digits) to match your broker’s format exactly.

Pro Tip: Always normalize after each calculation, not just once at the end!

Preventing rounding errors in EAs

Rounding errors sneak in like tiny gremlins, messing up your Expert Advisor’s logic. To avoid this:

  1. Lock your precision early: store critical values as double with the right digits.

  2. Backtest your strategy and inspect logs for odd price steps.

  3. If your EA shows ghost trades, debug for floating point mess-ups.

“Precision is the soul of a robust EA.” — MQL4 community wisdom


Why does my order fail or slip

Even with perfect code, your order might still slip or fail. Let’s break down real-world reasons traders get unexpected fills, delays, or no execution at all.

Low liquidity time traps

When volume thins out—like during market rollover or just before holidays—liquidity dries up. You’re trying to buy or sell in a near-empty room. Orders get delayed, or worse, filled at trash prices.
Pro tip: Avoid strategies that rely on pinpoint timing during dead trading hours. Lower liquidity = higher risk.

Broker requotes explained

Requotes happen when brokers can’t fill your trade at the price you clicked. It’s common with market makers or platforms using a dealing desk. If the price moves too fast, the broker tosses back a new quote.
“Requotes are a broker's way of saying: ‘Nice try. Try again.’” – Michael Hood, FX industry consultant

Spread widening surprises

Spread widening surprises

Spreads don’t always stay tight. When volatility hits, especially around big news events, spreads widen fast. This makes execution way more expensive than expected.

Event TypeAvg. Spread IncreaseRisk Level
NFP Release3.0xHigh
Earnings Season2.1xMedium
Market Open1.5xModerate

How news spikes affect fills

Markets go nuts when breaking news hits. Orders that were totally valid seconds ago may now be 20 pips off. Spikes in volatility cause slippage, missed fills, and late executions.

  1. Always check the news calendar.

  2. Use time-based filters in your EA.

  3. Don't assume calm conditions will last.

Hidden slippage in exotic pairs

Hidden slippage in exotic pairs

Trading exotic currency pairs like USD/TRY or EUR/ZAR? Welcome to the Wild West. These pairs are notorious for sneaky slippage. Low liquidity and wide spreads make it hard for brokers to execute cleanly.

  • Slippage often goes unnoticed unless you log it.

  • Use limit orders, not market, with exotics.

  • Test in live and demo—behavior can differ wildly.

Logging slippage for debugging

If you don’t track it, you can’t fix it. Logging slippage gives you a peek into what your EA’s really experiencing during trades.

  • Log Ask, Bid, and executed price.

  • Track time of execution and order type.

  • Use this data to refine strategy and spot broker issues.


Conclusion

Slippage isn’t just a tech hiccup — it’s the silent wallet-drainer that turns winning trades into “what happened?” moments. Now that you’ve seen how pips, points, and digits really play together in MQL4, you’re way ahead of the game.

As trading legend Paul Tudor Jones put it, “Don’t focus on making money, focus on protecting what you have.”

Use what you’ve learned. Tighten up your code, run real-world tests, and stop leaving your trades up to chance. You've got this.

What is the best slippage value in MT4?
  • There’s no magic number, but most traders stick to 2–5 pips for major pairs with tight spreads. If you’re trading exotic pairs or during high volatility, bump it up to avoid constant requotes. Always test on demo first.

How do I convert points to pips in MQL4?
  • Simple rule:

    Use the Digits property to detect this in your code.

    • For 5-digit brokers, 10 points = 1 pip

    • For 4-digit brokers, 1 point = 1 pip

Why does my EA keep getting requotes?
  • Requotes usually mean your slippage setting is too tight or the market moved faster than your broker could fill it. Try this:

    • Allow slightly higher slippage.

    • Avoid trading during major news releases.

    • Use limit or stop orders instead of instant execution when possible.

How do I check my broker’s digits?
  • Here’s a quick way:

    • Look at Digits in MetaEditor: MarketInfo(Symbol(), MODE_DIGITS)

    • Or check any chart’s price format:
      - 1.12345 = 5-digit
      - 1.1234 = 4-digit

Is slippage always bad for traders?
  • Not always! Sometimes slippage works in your favor — known as positive slippage. For example, if the market moves in your direction before the broker fills your order, you might get a better entry price than you asked for. But brokers rarely brag about this!

How can I log slippage in my EA?
  • Use basic logging. Inside your OrderSend() or OrderClose(), compare the expected price with the filled price and write it to a file or the Experts log. For example:

    This helps spot patterns over time.

    • double slip = OrderOpenPrice() - your_requested_price;

    • Print("Slippage: ", slip);

What’s the difference between spread and slippage?
  • Good question — traders mix these up a lot!

    So: spread is constant or known upfront, slippage is a surprise.

    • Spread: The fixed or variable gap between bid and ask.

    • Slippage: The unexpected difference between your desired price and the actual execution price.