Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

order ownership

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

    order ownership

    Hello,

    Can a strategy cancel/amend an order created by another strategy ?
    More generally : is there a strict ownership of orders ?

    Thanks

    #2
    Hello carmiFR,

    For strategies in Ninjatrader, you could think of each strategy as its own instance. each strategy manages its own orders, so it would not be able to manage another strategies orders.

    Please let me know if I may be of further assistance

    Comment


      #3
      Hello Jesse,

      Thanks for your answer.

      To be more precise : I have severals strategies collaborating (via static container members and lockers). The goal here is to have more clarity in the source code ... Whatever, in some cases, a strategy can "suspend" its own activity and transfer the ownership of its working orders to other strategies. In terms of implementation, if one of these orders gets events via OnOrderUpdate, the callbacked strategy just calls OnOrderUpdate to the strategy now owning the order. Then the new owning strategy can amend or cancel the order, calling ChangeOrder or CancelOrder with the order reference.

      So just to be clear : you say this have no chance to work ? Will this call Change/CancelOrder throw an exeception ? Or will these calls just be quietly ignored ?

      Many thanks
      Last edited by carmiFR; 04-09-2014, 02:35 PM.

      Comment


        #4
        Hello carmiFR,

        To answer your question, Correct this would not work in Ninjatrader as this is not how strategies are designed to be run through Ninjatrader.

        One way to explain this would be each strategy contains its own orders that are tied to this specific strategy. Strategies are unaware of what another strategy is doing.

        As for the second question, depending on the order methods being used you could get a null object reference error, or it would just ignore it.

        Please let me know if I may be of additional assistance

        Comment


          #5
          Hi carmiFR,

          If you already have the functionality that the Strategies can communicate with another then a possible workaround could be that you create a separate strategy that has only the purpose for order handling. This means that no other strategy will initiate orders by them self. If a trigger for an order is given the strategy sends a message to the orderhandling strategy and from there this stragey manges all orders that are initiated from your other strategies.

          This is just an idea, don't know if this is really possible inside NT.

          Good Luck

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          558 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          545 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X