Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to ChangeOrder(..) UnManaged

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

    How to ChangeOrder(..) UnManaged

    deleted...
    Last edited by defa0009; 09-20-2024, 03:36 PM.

    #2
    Hello defa0009,

    Do you mean a stop market order or a limit order? A market order cannot be changed, that will fill at the next best price and does not have a stop or limit price.

    You would otherwise do just like is shown in the help guide for ChangeOrder to change an order that does have a stop or limit price, you would fill in the overloads. https://ninjatrader.com/support/help...hangeorder.htm

    The account.Change is not correct for use with the managed or unmanaged approach.

    Comment


      #3
      Hello defa0009,

      Even with the changes it would be the same answer, you can see the help guide example for ChangeOrder, that is the correct way to change orders. Using Account.Change is not correct for the managed or unmanaged approach and should not be used.

      Comment


        #4
        Hello defa0009,

        How are you finding the order in your custom method? A variable should have been preset from OnOrderUpdate, are you doing that part of finding the order and storing it to a variable? If you are using the account directly to find orders that is also not correct for the unmanaged approach, you can see the following sample which shows the saving of orders to variables, those variables would be the orders that can be controlled with ChangeOrder.

        Comment


          #5
          Hello defa0009,

          The addon framework is not intended to be used with strategies, none of the strategy based properties or methods are for use with manual orders which the addon framework creates. You need to switch from using the addon framework to using the managed or unmanaged approach if you are using a strategy.

          Comment


            #6
            Hello defa0009,

            In that case I would suggest using an indicator so you won't get confused with strategy properties or methods that do not apply. The addon framework is not intended to be used in strategies because that will not work in combination with the strategies virtual properties or methods.

            To cancel orders that can be cancelled you can use the Cancel function on the account variable, market orders cannot be cancelled.

            To close a position you entered you can just submit an order in the opposite direction which will close out that position.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            30 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
            64 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            41 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