Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order & Fill Synch with IB TWS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Order & Fill Synch with IB TWS

    Hi Guys,


    I was wondering if you could help. I'm writing my own synchronization method for use in NT as NT synch does not support multiple algos per market.


    My questions surround the synchronization with the broker (I'm using IB TWS).
    Can I assume that if "Synchronization" is turned off then on OnConnectionLoss or OnStartUp NT will still synchronize orders and fills with TWS?


    As long as I can be assured that NT reliably reflects TWS then I can just focus on matching the orders with fills by strategy.


    Regards,

    #2
    Hello Aspirant,

    NinjaTrader will try to synchronize any orders that are filled while a connection is lost to your broke automatically once a connection has been re-established correct.

    As for manually synchronizing with your broker there is some unsupported code that you may view that can help you out with this on the following forum.
    Support for the development of custom automated trading strategies using NinjaScript.


    Happy to be of further
    JCNinjaTrader Customer Service

    Comment


      #3
      HI JC,

      Thanks for the clarification on fill and the code snippet...

      BTW, when I'm getting the Fills, is there any way to ascertain the Order ID from which the Fill originated? For example, the Order has an ID in NT and when it goes to TWS it will get an ID... How can I request these ID's to get a full chain of events to link the Order placed to the Fill received?

      What about orders? Let's say NT has sent an Order but TWS didn't receive it. What is NT's process for checking TWS has received an Order? Does it continue to check until it get's a confirm ticket ID and can I request that ID?

      Cheers,

      Comment


        #4
        Hello,

        You can use an IOrder to track this information such as myOrder.OrderId or myOrder.OrderSate



        The Order State will tell you where the order is in terms of being received by your broker. Once it receives a "Working" or "Accepted" state, it would be working on your brokers servers.

        More information on Order States and their definitions can be found in our Help Guide:

        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        148 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        5 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        5 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,283 views
        0 likes
        Last Post Leafcutter  
        Working...
        X