Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Some properties of an order can not be updated

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

    Some properties of an order can not be updated

    Hi
    I am connected to CQG and working with NT8
    I have a Superdom column indicator which generates target and stop orders according to logic I developed. To those orders i assign OCO and Name during the generation process of that order.
    This indicator which reacts to changes in my position works fine.
    However in case a manual target order is entered by the user I have to identify it in OnOrderUpdate(OrderEventArgs orderUpdate)
    set OCO to that manual order so that I will be able to attach to it stop loss order with the same OCO
    However the property OCO can not be updated , also the property Name can not be updated . Please enable both properties to be accessed.
    Attached error message
    Attached Files

    #2
    Hello,

    Thank you for the inquiry.

    The OCO and Name are set when you initially create the order by using the standard methods of creating orders in NinjaScript. After the fact these are read only as they should not be changed after the order has already been submitted. If a property was changed on this object, this would not be reflected on the brokers side because the platform would not have been aware of that change to provide that to the broker.

    The state OnOrderUpdate would indicate the order is already working though its states or has been created so it will have properties that are Read Only to persist the correct values being reported about that order from the various events. Only by calling supported methods the order can be updated, such as the methods to Cancel orders or resubmit an order using the same name to update its price.

    I am unsure of the logic that needs to occur for what you are trying to do, but manually assigning an OCO to an already existing order would not work as the order already exists and is not editable in this way.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      when i update the limit price of an order or the qty of an order
      the new values are submitted to the broker
      so why the update process wont work in case of OCO or NAME ?
      This sounds to me as limitation which exist at this moment at ninja and can be corrected

      Comment


        #4
        hi again
        I am still looking to understand why OCO and name of working order in the market can not be update , while other properties can be updated
        Can this be fixed ?

        Comment


          #5
          Hello,

          In general a major modification to an order such as the orders type, OCO, Name, ID etc.. would need to be a new order as these properties are no longer changeable after the order has been submitted. The callback or OnOrderUpdate is relaying the information back through the orders update events. To change the values that are readonly, you would need to cancel and resubmit the order with the values needed.

          To perform the actions you are trying, you would need to cancel any orders that need edited and resubmit all of the orders with needed OCO's at once per the standard order submission methods.

          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by usazencort, Today, 01:16 AM
          0 responses
          1 view
          0 likes
          Last Post usazencort  
          Started by kaywai, 09-01-2023, 08:44 PM
          5 responses
          603 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          6 responses
          22 views
          0 likes
          Last Post xiinteractive  
          Started by Pattontje, Yesterday, 02:10 PM
          2 responses
          20 views
          0 likes
          Last Post Pattontje  
          Started by flybuzz, 04-21-2024, 04:07 PM
          17 responses
          230 views
          0 likes
          Last Post TradingLoss  
          Working...
          X