Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing working orders from indicator

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

    Changing working orders from indicator

    I'm creating an indicator that executes a limit order using the following method:

    NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy();

    Since the action of the order if activated by a user I'm creating this as an indicator and not a strategy. Once the working order has been submitted, but not filled, how can I adjust the limit price of that order? Attempting to use ChangeOrder() from the indicator does not appear to work.

    #2
    Hello martyn73,

    Are you referring to the <account>.Change() method?
    https://ninjatrader.com/support/help...-us/change.htm

    If the .Change() method is not changing the order, assign the AtmStrategy object returned from StartAtmStrategy() to a variable and then call <atmStrategyObject>.AtmStrategyCancelEntryOrder( ).
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the reference, I got it working using <account>.Change(). I was originally looking at ChangeOrder(), https://ninjatrader.com/support/help...us/?change.htm
      How is that method different?

      Comment


        #4
        Hello martyn73,

        Are you referring to the ChangeOrder() method for NinjaScript Strategies only?

        This will only change an order owned by a NinjaScript Strategy.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          You can change an order from a indicator with


          myAccount.Change ( new [] {stopOrder})

          Also, you can send orders from indicator, with the mothod

          CreateOrder(Instrument instrument, OrderAction act ion, OrderType orderType, OrderEntry orderEntry, T imeInForce timeInForce, int quantity, double limit Price, double stopPrice, string oco, string name, DateTime gtd, CustomOrder customOrder)


          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          78 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          40 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          63 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          63 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X