Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stuck Orders

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

    Stuck Orders

    Hi,

    I was trying out an ATM strategy through code and I think I closed the open positions wrongly and now I have a bunch of stuck orders, all saying "Pending Submit" with orange color in the control center.

    I tried restarting, cancelling all orders, cancelling individual ones, switching data connections. But I still see all pending orders.

    Please help in sorting this issue.

    Thanks

    #2
    abhayt, this would be on the simulator, correct? If you you see those stuck orders, please try resetting it under Tools > Options > Simulator.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi,

      I keep having this issue in a real trading account with the FXCM account. Whenever there is a market-moving news realese (i.e. jobless claims figures at 8:30am ET) and a resulting big price move, my strategy generates entry or exit orders that get stuck in the PendingSubmit state. They are highlighted in yellow in the orders tab and just sit there forever.

      Looking at trace and log files does not show any issues. I see a line showing the order with a state 'PendingSubmit', and no subsequent log entries related to that order. No error messages etc.

      Worst of all, any new data feed from the FXCM servers appears to stop. I.e. prices in the quotes window in the Orders tab in NT stop updating and remain the same, all charts stop updating (in my case at the 8:30am ET minute bar), and I am even unable to manuall close or open position in either the Orders tab or the Positions tab. To clarify, the application does not freeze - I can move between windows, change settings, open strategy performance windows. It is just the datafeed from FXCM that appears to stall. The connection status in the bottom left corner however remains green the whole time.

      My take on it is that somehow during high-volume events (i.e. market news release) when NT tries to submit orders to FXCM it somehow either loses the connection without being aware of it, or does not get responses from the FXCM servers. This is the only explanation

      I had this same issue on different machines, always using the latest version of NT, tried resetting the database, reinstalling NT, etc. I have also had this issue with different FXCM accounts, both real and demo accounts. I also had this issue with orders generated with different NT strategies, including strategies that come with NT.

      I spend many hours trying to understand this issue. I would be grateful if you could provide any insight into this. As I mentioned above, this happens on different machines and in different accounts, so I am surprised not to have seen this issue mentioned more often in the support forum.

      Thank you for your help!

      Comment


        #4
        arussinov, welcome to our forums here and thanks for the detailed post. We're sorry to hear about those issues. Would you mind forwarding us the log / trace files via Help >> Mail to Support so we could review for any insights?

        We are not aware of a general issue in this regard, however you would need to keep in mind

        a) it would take 90 seconds to report a connection loss for this technology option, meaning if the connection dropped and was recovered in this time it would not be noted in the trace - yet you could see the issues you were facing

        b) if you're connected to the same Trading Status account on another machine and close the API connection there it would impact another machine / client as well.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thank you Bertrand

          Your point (b) makes sense, but I donn't think this is what is causing the issue in my case. I.e. I use the TS on another machine and close out of it quite often, but this issue happens only during high volume periods.

          To clarify your point (a): what happens if an order is submitted (reaches 'Accepted' state), immediately after which the connection with FXCM is lost but is recovered within 90 seconds? What happens on reconnection? If an order state has changed while the connection was down (say, went from 'Accepted' to 'Filled'), will NT receive the latest state of that order? It appears that if a brief disconnect is causing this issue then upon reconnect NT never receives the updated state of orders.

          Also, it seems from your post that such brief disconnect would not be registered by NT. Is this correct? Or would this be picked up by the OnConnectionStatus method in NinjaScript?

          Thank you for your help.
          Andrey

          Comment


            #6
            Hello,

            I believe our FXCM Disclaimer should help clarify that point:

            ---------------------------
            FXCM
            ---------------------------
            Disclaimer:


            3) Connection losses to FXCM are only reported 1m30s after the fact from the FXCM API. It is possible to already be disconnected from FXCM and have NinjaTrader not aware of this.


            5) For any order submitted during a prior trading session, if it was filled or cancelled before connecting or during a connection loss on the current session NinjaTrader will be unable to determine the order state. As a result NinjaTrader will set this order to a state of “Unknown” in the event that it was filled or cancelled prior to reconnect. It is your responsibility to call your broker to determine the true state of this order.
            OnConnectionStatus would not pick up this connection loss, unless the connection was lost for more than 90 seconds. At that point, the ConnectionStatus will update, and you'll receive the connection lost notification in the NinjaTrader contract center.
            MatthewNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by kujista, Today, 05:44 AM
            0 responses
            5 views
            0 likes
            Last Post kujista
            by kujista
             
            Started by ZenCortexCLICK, Today, 04:58 AM
            0 responses
            5 views
            0 likes
            Last Post ZenCortexCLICK  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            172 responses
            2,281 views
            0 likes
            Last Post sidlercom80  
            Started by Irukandji, Yesterday, 02:53 AM
            2 responses
            18 views
            0 likes
            Last Post Irukandji  
            Started by adeelshahzad, Today, 03:54 AM
            0 responses
            8 views
            0 likes
            Last Post adeelshahzad  
            Working...
            X