Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

StopLoss didn't cancel within seconds of the canceled, resulted in a reverse.

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

    #16
    Hello MarketAlly,

    While I can say that Market If Touched orders are not submitted to the brokerage until touched and the OCO is not in effect until the order is touched, I'm not certain about how NinjaTrader was intending for simulated orders to work with OCO.

    Native OCO would definitely not work since native OCO is meant to be executed server side using OCO IDs. Without the order being submitted to the exchange there is no way for the OCO to work. However, I am unsure if local simulated oco should be taking place instead with simulated orders.

    I have another client with a very similar inquiry about OCO with MIT orders and I am inquiring with our development on the expected behavior with OCO and simulated orders.

    Once I have more information about this I will post in this thread.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Hello MarketAlly,

      I did some testing with a script looking for this behavior. I've tested extensively but I was not able to reproduce the behavior.
      Below is a link to one of the tests that shows the behavior I'm getting every time.
      https://drive.google.com/open?id=1UC...0hYATToqa4J6XW

      This lets me know that when using MIT and Simulated Stop orders, NinjaTrader is designed to simulate Local OCO to attached orders.

      That said, I was noticing that it does take some time for the cancellation to be sent for the stop loss due to the chain of events. (Sometimes I was seeing north of 30 seconds for this to occur)
      Further, since this is Local OCO simulation and is not Native (server side OCO) it is absolutely possible for that Local OCO simulation to fail and for there to be in-flight-executions. (Meaning if the stop loss started to fill before receiving the cancellation request through the internet this would be an in-flight-execution.)

      I've attached the script I was using to test.

      I'd to review your log and trace files where this occurred to double check that the cancellation was attempted a few seconds after the MIT order was cancelled as demonstrated in the video I've provided.

      Please send an email to platformsupport [at] ninjatrader [dot] com. In the email, please include a link to this forum thread.
      Attached Files
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        I had previously sent the logs in when I initially reported the issue and received the same response from them about the method to use. But as you saw above, I cannot use that method in production especially when we are getting 45-60pt face rips and if we are running multiple cars [contracts], the markets will punish that approach. So I wrote around this issue using the OCO’s submitted at the exchange and can’t depend on NT local side. If you want o review my logs, I should still be in the ticket system.

        The fact you cant reproduce it doesn’t surprise me. I have had 400 orders before hitting it in a specific scenario which only happens with live order never sim.

        I dont post here unless it actually happens but all is good now, just wish you guys were clearer in your docs. I was not the only one that took a hit around this.

        Comment


          #19
          Hello MarketAlly,

          Please refrain from both sending an email to directly to support and posting on the forums at the same time.

          Its fine to post to the forums, and we may ask that you email in when we need more information, but we will only be responding to you in one location and this allows us to both prevent multiple technicians from working on the same issue and allows us to keep track of the ticket and know whats been discussed and what hasn't.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #20
            I submitted part way through the thread when the question of execution closing was asked.

            Comment


              #21
              And lately these markets have been moving at the speed of lightning that might be a factor too. Do you run the strategy on a local machine or a VPS?

              Comment


                #22
                Originally posted by Trader17 View Post
                And lately these markets have been moving at the speed of lightning that might be a factor too. Do you run the strategy on a local machine or a VPS?
                I am running beefy VMs for me and my clients with some of them leasing on their own bare metal machines - I am a hawk around resources; they all report up metrics to ensure they are running to spec and the machines are not the bottleneck. This was an execution issue with the software. It is fine now, I have written around the issue to ensure execution occurs at the exchange and new orders are sent to the exchange which cancels the complete OCOs thus removing the race condition on the software side.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Today, 05:17 AM
                0 responses
                42 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                124 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                65 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                42 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                46 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X