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 Christopher_R, Today, 12:29 AM
        0 responses
        6 views
        0 likes
        Last Post Christopher_R  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        166 responses
        2,235 views
        0 likes
        Last Post sidlercom80  
        Started by thread, Yesterday, 11:58 PM
        0 responses
        3 views
        0 likes
        Last Post thread
        by thread
         
        Started by jclose, Yesterday, 09:37 PM
        0 responses
        7 views
        0 likes
        Last Post jclose
        by jclose
         
        Started by WeyldFalcon, 08-07-2020, 06:13 AM
        10 responses
        1,415 views
        0 likes
        Last Post Traderontheroad  
        Working...
        X