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

Compound Order is in a State that prohibits modification

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

    Compound Order is in a State that prohibits modification

    I wrote a small strategy to try and understand how OCO Orders are handled on a CQG Live Account.

    The strategy has two buttons:
    - First button enters long at market and places a tight stop and target with OCO
    - Second button submits a market sell order with the same OCO ID

    After both the stop and target are in a working state, the next call to OnOrderUpdate will trigger an exit at the market (trying to simulate an in-flight order being placed while the stop and target are being filled).

    If I click the "long" button and then the "exit" button, the Market order to sell is filled, and CQG correctly cancels the working Stop and Target orders. I can see from the Trace file that the exit order is "Filled" and that the Stop and Target order both have state "Cancelled" as expected.

    However something weird then happens, Ninjatrader attempts to make a modification to one of the orders and CQG throws an error "Compound Order is in a state that prohibits modification"



    Attached Files

    #2
    Hello kevinenergy,
    Thanks for your post.

    I am not familiar with this specific error message, but I would imagine that a compound order is referring to the OCO group. I also did not see the same behavior when I tested your strategy on my end (After removing the custom libraries.)

    Do you see the same issue if you do not include those libraries?

    What specific steps do you believe I can take to reproduce this on my end?
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Hey Josh, apologies for the stray using-declarations, I thought I'd stripped out all my extra code. Did you test it on a Live CQG account? It doesn't happen on the Sim account.

      I get the error if I press the "long" button and then press the "exit" button.

      Comment


        #4
        kevinenergy,

        I just tried it on a live CQG account and I'm not getting the error.

        What version of NinjaTrader 8 are you using?
        Josh G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by AttiM, 02-14-2024, 05:20 PM
        12 responses
        213 views
        0 likes
        Last Post DrakeiJosh  
        Started by cre8able, 02-11-2023, 05:43 PM
        3 responses
        237 views
        0 likes
        Last Post rhubear
        by rhubear
         
        Started by frslvr, 04-11-2024, 07:26 AM
        8 responses
        117 views
        1 like
        Last Post NinjaTrader_BrandonH  
        Started by stafe, 04-15-2024, 08:34 PM
        10 responses
        47 views
        0 likes
        Last Post stafe
        by stafe
         
        Started by rocketman7, Today, 09:41 AM
        3 responses
        12 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X