Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Market position and order status after connection loss

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

    Market position and order status after connection loss

    Dear Traders,

    I was wondering what would happen in the following scenario:
    1. A strategy is trading one instrument
    2. The strategy has a market position (e.g. long) and there is a sell order working
    3. The connection is lost
    4. The order is filled while the connection is lost
    5. The connection is reestablished

    1) What is the status of the order? OnOrderUpdate didn't execute so my object will not be null. In fact, my order object would have a status= working.
    2) What is position of the strategy? long or flat?

    Thanks in advance,

    Juan

    #2
    Hello Juan,

    I'm giving this some testing to be sure of my answer. Basically I am going to submit an order disconnect the internet wait for a while until i think it has filled and then reconnect the internet.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Juan,

      Below is a link to a video of the test.
      https://drive.google.com/file/d/1PQN...w?usp=drivesdk

      In the video we see the behavior of the default Recalculate setting. Once the connection is regained, NinjaTrader does acknowledge the order has filled. However as the strategy is restarted and recalculates, a new order is placed.

      Second we see the behavior of the Keep running setting. Once the connection is regained, NinjaTrader acknowledges the order has filled on the brokerage servers, the strategy position is updated and the order state of the order changes in the prints to orderState=Filled.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Thanks Chelsea!

        This is super useful. I'll take a look at the video and I'll get back to you if I have any further questions.

        Thanks one more time!!!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ETFVoyageur, Today, 02:08 AM
        2 responses
        18 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by PaulMohn, Yesterday, 02:06 AM
        6 responses
        18 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by NM_eFe, Yesterday, 06:14 AM
        3 responses
        16 views
        0 likes
        Last Post NM_eFe
        by NM_eFe
         
        Started by PaulMohn, Yesterday, 01:45 PM
        3 responses
        2 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by ChartTourist, 04-27-2024, 08:22 AM
        4 responses
        56 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X