Page 1 of 2

Pending order behavior under news load: compare notes

Posted: Sun Oct 04, 2026 8:45 pm
by LondonScalper
This is a thread to collect real observations about how pending orders behave at different brokers when a big release hits. I'll start with my notes and I'd like others to add theirs in the same format, so we have something more useful than "my broker is fine" or "my broker is a scam".

My format: broker type (raw ECN, standard, prop), pair, release, order type, distance from price at release, what happened.

My recent observations, all from my own logs:

Raw account, EURUSD, US CPI, buy stop 8 pips above market. Triggered in the first second, filled 1.4 pips beyond the stop price.

Raw account, EURUSD, US jobs report, sell limit 15 pips above market. Price spiked through it. Filled at the limit price exactly. Limits, in my experience, don't get worse fills, but they can be skipped.

Standard account, GBPUSD, BoE decision, buy stop 10 pips above market. Triggered, filled 3.2 pips beyond the stop price.

Prop evaluation, gold, US CPI, sell stop $3 below market. Triggered, filled about $1.10 beyond.

Raw account, USDJPY, Japanese data, buy limit 12 pips below market. Not triggered, as price didn't get there.

My general takeaways: stop orders slip under news, sometimes significantly. Limit orders fill at the price or not at all. The bigger the release, the bigger the slip.

Have you seen limits skipped or stops slip at your broker? Please post yours in the same format, with times in your local zone.

Re: Pending order behavior under news load: compare notes

Posted: Sun Oct 04, 2026 10:55 pm
by PTScalper
LondonScalper wrote: Sun Oct 04, 2026 8:45 pm This is a thread to collect real observations about how pending orders behave at different brokers when a big release hits. I'll start with my notes and I'd like others to add theirs in the same format, so we have something more useful than "my broker is fine" or "my broker is a scam".

My format: broker type (raw ECN, standard, prop), pair, release, order type, distance from price at release, what happened.

My recent observations, all from my own logs:

Raw account, EURUSD, US CPI, buy stop 8 pips above market. Triggered in the first second, filled 1.4 pips beyond the stop price.

Raw account, EURUSD, US jobs report, sell limit 15 pips above market. Price spiked through it. Filled at the limit price exactly. Limits, in my experience, don't get worse fills, but they can be skipped.

Standard account, GBPUSD, BoE decision, buy stop 10 pips above market. Triggered, filled 3.2 pips beyond the stop price.

Prop evaluation, gold, US CPI, sell stop $3 below market. Triggered, filled about $1.10 beyond.

Raw account, USDJPY, Japanese data, buy limit 12 pips below market. Not triggered, as price didn't get there.

My general takeaways: stop orders slip under news, sometimes significantly. Limit orders fill at the price or not at all. The bigger the release, the bigger the slip.

Have you seen limits skipped or stops slip at your broker? Please post yours in the same format, with times in your local zone.
HI,

thank you for interesting thread.

Here are my logs to add to the thread, focusing heavily on Take Profit and Limit orders to complement your observations on Stops.

My logs:

Raw ECN (IC Markets), EURUSD, US CPI, Take profit (Limit) 15 pips above market. Price gapped straight through the TP level. Triggered and filled with 2.3 pips of positive slippage (better than the set price).

Raw ECN (IC Markets), GBPUSD, NFP, Buy limit 10 pips below market. News triggered a flash drop and immediate reversal. Filled with 1.1 pips of positive slippage.

Raw ECN (IC Markets), XAUUSD, FOMC, Sell stop 20 pips below market. Triggered during the initial spike down. Filled with 6.5 pips of negative slippage.

I want to expand on why this happens, and clarify one crucial point regarding your observation that "Limits fill at the price exactly or not at all." From my experience trading Raw ECN accounts, limit orders absolutely can and do get different fill prices—but that difference is almost always in your favor.

Re: Pending order behavior under news load: compare notes

Posted: Sun Oct 04, 2026 10:55 pm
by PTScalper
Here is what is actually happening in the broker's order matching engine during a major release:

The Liquidity Vacuum and Price Gaps

Seconds before a major data release (like CPI or NFP), Tier-1 liquidity providers pull their pending orders from the market to avoid being caught on the wrong side of a surprise. The order book becomes incredibly thin, and spreads widen. When the news hits, the price does not move smoothly tick-by-tick; it "gaps". If price is at 1.1000 and a massive beat drops, the very next available quote might be 1.1025. Prices 1.1001 through 1.1024 simply did not exist in the live market.

Re: Pending order behavior under news load: compare notes

Posted: Sun Oct 04, 2026 10:56 pm
by PTScalper
Stop Orders (Negative Slippage)

A Stop order (Stop Loss or Buy/Sell Stop) is an instruction that says: "If price touches X, fire a Market Order immediately." If you have a Buy Stop at 1.1010, but the price gaps from 1.1000 straight to 1.1025, your order is triggered after the gap. It becomes a market order demanding the next available price, which is 1.1025. You suffer negative slippage. Stops guarantee execution, but they do not guarantee price.

Re: Pending order behavior under news load: compare notes

Posted: Sun Oct 04, 2026 10:57 pm
by PTScalper
Limit Orders (Positive Slippage)

A Limit order (Take Profit or Buy/Sell Limit) is an instruction that says: "Fill me at X, or a BETTER price." Using the same gap scenario, if you are long with a Take Profit at 1.1010, and the market gaps to 1.1025, your order is triggered. Because the only available price (1.1025) is mathematically better than your limit, true ECN/STP brokers pass that price improvement directly to you. You gain positive slippage.

Why Limits Get Skipped

When a limit gets skipped entirely, it usually means the price touched your level, but there simply wasn't enough volume at that exact microsecond to fill your specific lot size before the market reversed. Limits guarantee price, but they do not guarantee execution.

Broker Execution Models

You generally only see this positive slippage on true ECN/STP accounts (like IC Markets Raw) where trades are passed directly to real liquidity providers. Some Market Maker (B-Book) brokers employ "asymmetrical slippage" software. They will happily pass on negative slippage for your stop orders, but if a gap jumps over your Take Profit, they will execute it at your exact requested price and pocket the positive slippage difference for themselves.

Re: Pending order behavior under news load: compare notes

Posted: Sun Oct 04, 2026 10:59 pm
by PTScalper
Here is a complete cTrader cBot (C# script) designed to run in the background and automatically log the exact execution slippage of your orders.

It tracks both Entry Slippage (when a Stop or Limit order triggers) and Exit Slippage (when a Take Profit or Stop Loss is hit), correctly applying the math to show whether you received positive or negative slippage in pips.

Re: Pending order behavior under news load: compare notes

Posted: Sun Oct 04, 2026 10:59 pm
by PTScalper
The cTrader Slippage Monitor

Code: Select all

using System;
using System.Linq;
using System.Collections.Generic;
using cAlgo.API;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class SlippageMonitor : Robot
    {
        // Cache to track target prices of pending orders before they execute
        private Dictionary<int, PendingOrderData> _pendingOrdersCache = new Dictionary<int, PendingOrderData>();
        
        // Cache to track SL/TP targets of active positions before they close
        private Dictionary<int, PositionData> _positionsData = new Dictionary<int, PositionData>();

        protected override void OnStart()
        {
            // 1. Initialize existing pending orders
            foreach (var po in PendingOrders)
            {
                AddToCache(po);
            }

            // 2. Initialize existing positions
            foreach (var pos in Positions)
            {
                _positionsData[pos.Id] = new PositionData { StopLoss = pos.StopLoss, TakeProfit = pos.TakeProfit };
            }

            // 3. Subscribe to pending order events to maintain our entry cache
            PendingOrders.Created += args => AddToCache(args.PendingOrder);
            PendingOrders.Modified += args => AddToCache(args.PendingOrder);
            
            // 4. Subscribe to position events for execution tracking
            Positions.Opened += PositionsOnOpened;
            Positions.Modified += PositionsOnModified;
            Positions.Closed += PositionsOnClosed;

            // Timer to clean up cancelled orders from our cache
            Timer.Start(TimeSpan.FromSeconds(2));
            
            Print("SlippageMonitor started. Actively tracking Entry (Limit/Stop) and Exit (TP/SL) slippage.");
        }

        protected override void OnTimer()
        {
            // Remove orders that were manually cancelled (not filled)
            var activeIds = new HashSet<int>(PendingOrders.Select(po => po.Id));
            var keysToRemove = _pendingOrdersCache.Keys.Where(id => !activeIds.Contains(id)).ToList();
            
            foreach (var id in keysToRemove)
            {
                _pendingOrdersCache.Remove(id);
            }
        }

        private void AddToCache(PendingOrder po)
        {
            _pendingOrdersCache[po.Id] = new PendingOrderData
            {
                Id = po.Id,
                SymbolName = po.SymbolName,
                TradeType = po.TradeType,
                TargetPrice = po.TargetPrice,
                OrderType = po.PendingOrderType
            };
        }

        private void PositionsOnOpened(PositionOpenedEventArgs args)
        {
            var position = args.Position;
            var symbol = Symbols.GetSymbol(position.SymbolName);

            // 1. Store the new position's SL/TP to track future Exit Slippage
            _positionsData[position.Id] = new PositionData 
            { 
                StopLoss = position.StopLoss, 
                TakeProfit = position.TakeProfit 
            };

            // 2. Check for Entry Slippage (Did a cached pending order trigger this?)
            var activeIds = new HashSet<int>(PendingOrders.Select(po => po.Id));
            var matchedIds = _pendingOrdersCache.Keys
                .Where(id => !activeIds.Contains(id))
                .Where(id => _pendingOrdersCache[id].SymbolName == position.SymbolName && 
                             _pendingOrdersCache[id].TradeType == position.TradeType)
                .ToList();

            if (matchedIds.Count > 0)
            {
                var filledOrder = _pendingOrdersCache[matchedIds.First()];
                
                double diff = CalculateEntrySlippage(position.TradeType, filledOrder.TargetPrice, position.EntryPrice);
                double pips = Math.Round(diff / symbol.PipSize, 1);
                string slipString = pips >= 0 ? $"+{pips}" : pips.ToString();

                Print($"[ENTRY SLIPPAGE] {filledOrder.OrderType} triggered on {position.SymbolName}. Target: {filledOrder.TargetPrice}, Filled: {position.EntryPrice}, Slippage: {slipString} pips");

                // Remove from cache to prevent duplicates
                _pendingOrdersCache.Remove(filledOrder.Id);
            }
        }

        private void PositionsOnModified(PositionModifiedEventArgs args)
        {
            var pos = args.Position;
            if (_positionsData.ContainsKey(pos.Id))
            {
                _positionsData[pos.Id].StopLoss = pos.StopLoss;
                _positionsData[pos.Id].TakeProfit = pos.TakeProfit;
            }
        }

        private void PositionsOnClosed(PositionClosedEventArgs args)
        {
            var position = args.Position;
            var symbol = Symbols.GetSymbol(position.SymbolName);

            if (_positionsData.TryGetValue(position.Id, out var data))
            {
                double? expectedPrice = null;
                string reasonStr = "";

                // Determine if closed by an automated target
                if (args.Reason == PositionCloseReason.StopLoss && data.StopLoss.HasValue)
                {
                    expectedPrice = data.StopLoss.Value;
                    reasonStr = "Stop Loss";
                }
                else if (args.Reason == PositionCloseReason.TakeProfit && data.TakeProfit.HasValue)
                {
                    expectedPrice = data.TakeProfit.Value;
                    reasonStr = "Take Profit";
                }

                if (expectedPrice.HasValue)
                {
                    // Look up the exact closing price from the History log
                    var historyItem = History.LastOrDefault(h => h.PositionId == position.Id);
                    if (historyItem != null)
                    {
                        double closingPrice = historyItem.ClosingPrice;
                        double diff = CalculateExitSlippage(position.TradeType, expectedPrice.Value, closingPrice);
                        double pips = Math.Round(diff / symbol.PipSize, 1);
                        string slipString = pips >= 0 ? $"+{pips}" : pips.ToString();

                        Print($"[EXIT SLIPPAGE] {position.SymbolName} {position.TradeType} closed by {reasonStr}. Target: {expectedPrice.Value}, Filled: {closingPrice}, Slippage: {slipString} pips");
                    }
                }
                
                // Cleanup
                _positionsData.Remove(position.Id);
            }
        }

        // Logic mathematically accounts for positive/negative direction
        private double CalculateEntrySlippage(TradeType tradeType, double expectedPrice, double actualPrice)
        {
            // Buying to Open: Lower fill is better.
            // Selling to Open: Higher fill is better.
            return tradeType == TradeType.Buy ? expectedPrice - actualPrice : actualPrice - expectedPrice;
        }

        private double CalculateExitSlippage(TradeType tradeType, double expectedPrice, double actualPrice)
        {
            // Closing a Buy means we are Selling: Higher fill is better.
            // Closing a Sell means we are Buying: Lower fill is better.
            return tradeType == TradeType.Buy ? actualPrice - expectedPrice : expectedPrice - actualPrice;
        }
    }

    public class PendingOrderData
    {
        public int Id { get; set; }
        public string SymbolName { get; set; }
        public TradeType TradeType { get; set; }
        public double TargetPrice { get; set; }
        public PendingOrderType OrderType { get; set; }
    }

    public class PositionData
    {
        public double? StopLoss { get; set; }
        public double? TakeProfit { get; set; }
    }
}

Re: Pending order behavior under news load: compare notes

Posted: Sun Oct 04, 2026 11:00 pm
by PTScalper
How to Install and Run

1.) Open cTrader and switch to the Automate tab on the left.

2.) Click the + icon next to "cBots" and name it SlippageMonitor.

3.) Erase the default template and paste the code above into the code editor.

4.) Click the Build icon (or press Ctrl+B).

5.) Add an instance of this cBot to any chart and hit "Play".

Because the Positions and PendingOrders collections in the cTrader API fetch data account-wide, you only need to attach this bot to one single chart. It will automatically detect, calculate, and log execution metrics into the bot's "Log" tab across all pairs trading on your account.

Re: Pending order behavior under news load: compare notes

Posted: Sun Oct 04, 2026 11:01 pm
by PTScalper
o make this a true "professional-grade" utility—especially since your goal is to collect and share hard data on a forum—we need to upgrade it from a simple console logger to a complete data-collection tool.

Here is the "Pro" version. I have added three major enterprise-level features:

Automated CSV Export: It automatically writes every slippage event directly to a .csv file on your Desktop. You can open this in Excel, create charts, and share the raw data on your forum thread.

On-Chart HUD (Heads Up Display): It draws a real-time dashboard on your chart showing your running statistics (Total events tracked, Average Slippage, Best Fill, Worst Fill).

Custom Parameters: You can now toggle the CSV logging, change the file name, and adjust the UI position straight from the cTrader interface without touching the code.

Re: Pending order behavior under news load: compare notes

Posted: Sun Oct 04, 2026 11:01 pm
by PTScalper
The Professional Slippage Analytics cBot

Code: Select all

using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using cAlgo.API;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class SlippageMonitorPro : Robot
    {
        [Parameter("Enable CSV Logging", DefaultValue = true, Group = "Data Export")]
        public bool EnableCsv { get; set; }

        [Parameter("CSV File Name", DefaultValue = "NewsSlippageData.csv", Group = "Data Export")]
        public string CsvFileName { get; set; }

        [Parameter("HUD Position", DefaultValue = VerticalAlignment.Top, Group = "UI Settings")]
        public VerticalAlignment HudVertical { get; set; }

        [Parameter("HUD Position", DefaultValue = HorizontalAlignment.Left, Group = "UI Settings")]
        public HorizontalAlignment HudHorizontal { get; set; }

        // Caches
        private Dictionary<int, PendingOrderData> _pendingOrdersCache = new Dictionary<int, PendingOrderData>();
        private Dictionary<int, PositionData> _positionsData = new Dictionary<int, PositionData>();

        // Statistics
        private int _totalEvents = 0;
        private double _totalSlippagePips = 0;
        private double _worstSlippage = 0;
        private double _bestSlippage = 0;

        // UI Elements
        private TextBlock _uiTotalEvents;
        private TextBlock _uiAvgSlippage;
        private TextBlock _uiExtremes;

        protected override void OnStart()
        {
            InitializeDataFile();
            DrawHud();

            foreach (var po in PendingOrders) AddToCache(po);
            foreach (var pos in Positions) _positionsData[pos.Id] = new PositionData { StopLoss = pos.StopLoss, TakeProfit = pos.TakeProfit };

            PendingOrders.Created += args => AddToCache(args.PendingOrder);
            PendingOrders.Modified += args => AddToCache(args.PendingOrder);
            
            Positions.Opened += PositionsOnOpened;
            Positions.Modified += PositionsOnModified;
            Positions.Closed += PositionsOnClosed;

            Timer.Start(TimeSpan.FromSeconds(2));
            Print("Pro Slippage Analytics running. Writing data to desktop.");
        }

        protected override void OnTimer()
        {
            var activeIds = new HashSet<int>(PendingOrders.Select(po => po.Id));
            var keysToRemove = _pendingOrdersCache.Keys.Where(id => !activeIds.Contains(id)).ToList();
            foreach (var id in keysToRemove) _pendingOrdersCache.Remove(id);
        }

        private void AddToCache(PendingOrder po)
        {
            _pendingOrdersCache[po.Id] = new PendingOrderData
            {
                Id = po.Id,
                SymbolName = po.SymbolName,
                TradeType = po.TradeType,
                TargetPrice = po.TargetPrice,
                OrderType = po.PendingOrderType
            };
        }

        private void PositionsOnOpened(PositionOpenedEventArgs args)
        {
            var pos = args.Position;
            var symbol = Symbols.GetSymbol(pos.SymbolName);
            _positionsData[pos.Id] = new PositionData { StopLoss = pos.StopLoss, TakeProfit = pos.TakeProfit };

            var activeIds = new HashSet<int>(PendingOrders.Select(po => po.Id));
            var matchedIds = _pendingOrdersCache.Keys
                .Where(id => !activeIds.Contains(id) && _pendingOrdersCache[id].SymbolName == pos.SymbolName && _pendingOrdersCache[id].TradeType == pos.TradeType)
                .ToList();

            if (matchedIds.Count > 0)
            {
                var order = _pendingOrdersCache[matchedIds.First()];
                double diff = CalculateEntrySlippage(pos.TradeType, order.TargetPrice, pos.EntryPrice);
                double pips = Math.Round(diff / symbol.PipSize, 1);

                ProcessSlippageEvent(order.OrderType.ToString(), pos.SymbolName, order.TargetPrice, pos.EntryPrice, pips);
                _pendingOrdersCache.Remove(order.Id);
            }
        }

        private void PositionsOnModified(PositionModifiedEventArgs args)
        {
            var pos = args.Position;
            if (_positionsData.ContainsKey(pos.Id))
            {
                _positionsData[pos.Id].StopLoss = pos.StopLoss;
                _positionsData[pos.Id].TakeProfit = pos.TakeProfit;
            }
        }

        private void PositionsOnClosed(PositionClosedEventArgs args)
        {
            var pos = args.Position;
            var symbol = Symbols.GetSymbol(pos.SymbolName);

            if (_positionsData.TryGetValue(pos.Id, out var data))
            {
                double? expected = args.Reason == PositionCloseReason.StopLoss ? data.StopLoss : 
                                   args.Reason == PositionCloseReason.TakeProfit ? data.TakeProfit : null;

                if (expected.HasValue)
                {
                    var historyItem = History.LastOrDefault(h => h.PositionId == pos.Id);
                    if (historyItem != null)
                    {
                        double diff = CalculateExitSlippage(pos.TradeType, expected.Value, historyItem.ClosingPrice);
                        double pips = Math.Round(diff / symbol.PipSize, 1);
                        ProcessSlippageEvent(args.Reason.ToString(), pos.SymbolName, expected.Value, historyItem.ClosingPrice, pips);
                    }
                }
                _positionsData.Remove(pos.Id);
            }
        }

        private void ProcessSlippageEvent(string orderType, string symbol, double expected, double actual, double pips)
        {
            // 1. Log to console
            string sign = pips >= 0 ? "+" : "";
            Print($"[{orderType}] {symbol} | Target: {expected} | Fill: {actual} | Slippage: {sign}{pips} pips");

            // 2. Update Stats & HUD
            _totalEvents++;
            _totalSlippagePips += pips;
            _bestSlippage = Math.Max(_bestSlippage, pips);
            _worstSlippage = Math.Min(_worstSlippage, pips);
            UpdateHud();

            // 3. Write to CSV
            if (EnableCsv)
            {
                try
                {
                    string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), CsvFileName);
                    string line = $"{Server.Time:yyyy-MM-dd HH:mm:ss.fff},{symbol},{orderType},{expected},{actual},{pips}\n";
                    File.AppendAllText(path, line);
                }
                catch (Exception ex)
                {
                    Print("Failed to write to CSV. Is the file open in Excel? Error: " + ex.Message);
                }
            }
        }

        private double CalculateEntrySlippage(TradeType tradeType, double expected, double actual) => 
            tradeType == TradeType.Buy ? expected - actual : actual - expected;

        private double CalculateExitSlippage(TradeType tradeType, double expected, double actual) => 
            tradeType == TradeType.Buy ? actual - expected : expected - actual;

        private void InitializeDataFile()
        {
            if (!EnableCsv) return;
            string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), CsvFileName);
            if (!File.Exists(path))
            {
                File.WriteAllText(path, "Timestamp,Symbol,OrderType,TargetPrice,FillPrice,Slippage(Pips)\n");
            }
        }

        private void DrawHud()
        {
            var panel = new StackPanel { BackgroundColor = Color.FromArgb(200, 30, 30, 30), Margin = 10 };
            
            var header = new TextBlock { Text = "SLIPPAGE ANALYTICS", FontWeight = FontWeight.ExtraBold, ForegroundColor = Color.Gold, Margin = new Thickness(10, 10, 10, 5) };
            _uiTotalEvents = new TextBlock { Text = "Events Tracked: 0", ForegroundColor = Color.White, Margin = new Thickness(10, 0, 10, 2) };
            _uiAvgSlippage = new TextBlock { Text = "Avg Slippage: 0.0 pips", ForegroundColor = Color.White, Margin = new Thickness(10, 0, 10, 2) };
            _uiExtremes = new TextBlock { Text = "Best: 0.0 | Worst: 0.0", ForegroundColor = Color.White, Margin = new Thickness(10, 0, 10, 10) };

            panel.AddChild(header);
            panel.AddChild(_uiTotalEvents);
            panel.AddChild(_uiAvgSlippage);
            panel.AddChild(_uiExtremes);

            Chart.AddControl(new Border { Child = panel, BorderColor = Color.Gray, BorderThickness = new Thickness(1), VerticalAlignment = HudVertical, HorizontalAlignment = HudHorizontal });
        }

        private void UpdateHud()
        {
            Chart.BeginInvokeOnMainThread(() =>
            {
                _uiTotalEvents.Text = $"Events Tracked: {_totalEvents}";
                double avg = Math.Round(_totalSlippagePips / _totalEvents, 2);
                _uiAvgSlippage.Text = $"Avg Slippage: {(avg >= 0 ? "+" : "")}{avg} pips";
                _uiAvgSlippage.ForegroundColor = avg >= 0 ? Color.LimeGreen : Color.Tomato;
                _uiExtremes.Text = $"Best: +{_bestSlippage} | Worst: {_worstSlippage}";
            });
        }
    }

    public class PendingOrderData
    {
        public int Id { get; set; }
        public string SymbolName { get; set; }
        public TradeType TradeType { get; set; }
        public double TargetPrice { get; set; }
        public PendingOrderType OrderType { get; set; }
    }

    public class PositionData
    {
        public double? StopLoss { get; set; }
        public double? TakeProfit { get; set; }
    }
}