No announcement yet.

Partner 728x90


Realtime with IBKR: Executions Outside Market Data

  • Filter
  • Time
  • Show
Clear All
new posts

    Realtime with IBKR: Executions Outside Market Data


    I have this issue when I'm testing my strategies in realtime where my orders get filled outside of bar data.
    Here's a picture of a short exit that was executed at the open of the market.

    Click image for larger version  Name:	Screenshot 2021-04-20 095436.png Views:	0 Size:	26.7 KB ID:	1152422

    For reference, my exit condition is met when the price goes below that bottom blue line.
    I am also currently receiving my realtime data from IBKR, but I was previously using Kinetick and still experiencing this.

    This problem generally only occurs during the start of the day, due to the large amount of slippage experienced.
    If I were to restart this strategy, the historical trades wouldn't add up. If the market closes without moving below the blue line's peak today, my strategy would fall out of sync.

    Two questions:
    a) If I'm able to buy a round lot at that price, how come it's not a part of the bar data?
    b) How do I enforce the execution of orders strictly within market data?

    Here's the execution details just in case:
    CHKP Buy 100 118.61 2021-04-20 9:30:01 AM CHKP/000100df.607e930b.01.01 Entry 100 L 1676749648 SX $0.00 1 U******* My Interactive Brokers

    Hello Newant,

    Thank you for your post.

    Please check a Bid and Ask series to check for out of range fill for a realtime order.

    In the data series menu, change "Price based on" to Bid or Ask and see if the price falls in line with the order you submitted.

    Do you see this matching a bid or ask tick?

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service


      Ah, I see what you're talking about now. I opened up a chart for CHKP on TWS, and put the bar data from both charts next to each other.

      Wow, a whole difference of 19 cents, this is clearly where the issue is.
      So I loaded up the bid and ask data series. The ask data series had a low of 118.88, so clearly it doesn't match the IBKR chart.
      Then I looked at the bid chart data, and...
      Click image for larger version

Name:	I don't get it.png
Views:	50
Size:	51.4 KB
ID:	1152456

      The bid chart data has an open of 118.00, that's 61 cents lower than what that IBKR TWS chart had!
      I am currently on hold with IBKR, seeking support from them as well.
      Here's my chart parameters on NT:

      Click image for larger version

Name:	chart params.png
Views:	39
Size:	33.3 KB
ID:	1152457

      What am I doing wrong here? None of the "Price based on" charts look anything like the one on TWS.


        Hello Newant,

        Thank you for your reply.

        Are you using the supported version of TWS to connect to NinjaTrader? The supported version of TWS is 978.2c. If you don't have this version installed, please install it and ensure the settings are correct following this guide: in advance; I look forward to assisting you further.
        Kate W.NinjaTrader Customer Service


          Yes I am using the most updated version of TWS, and I have also correctly set up my connection.


            Hello Newant,

            When I test viewing CHKP, the data is matching for Bid/Ask and Last prices. I have attached screenshots.

            When I place orders to my Interactive Brokers paper trading account, the orders are filling at their respective bid/ask levels.

            I may suggest ensuring that you have the timezone in TWS set to the same as what is configured in NinjaTrader if you have already resynced your PC clock.

            If you see results like I am seeing this is what we would be looking for.

            We look forward to assisting.
            Attached Files
            JimNinjaTrader Customer Service


            Latest Posts


            Topics Statistics Last Post
            Started by aligator, Today, 02:38 PM
            0 responses
            Last Post aligator  
            Started by Stett0002, Yesterday, 11:55 PM
            1 response
            Last Post NinjaTrader_ShawnB  
            Started by KasLB, Today, 05:12 AM
            2 responses
            1 like
            Last Post KasLB
            by KasLB
            Started by LeitoGTR, Yesterday, 06:41 PM
            2 responses
            Last Post LeitoGTR  
            Started by Prisalice, Today, 07:07 AM
            1 response
            Last Post NT-Roland