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

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 pechtri, 06-22-2023, 02:31 AM
          10 responses
          124 views
          0 likes
          Last Post Leeroy_Jenkins  
          Started by judysamnt7, 03-13-2023, 09:11 AM
          4 responses
          59 views
          0 likes
          Last Post DynamicTest  
          Started by ScottWalsh, Yesterday, 06:52 PM
          4 responses
          36 views
          0 likes
          Last Post ScottWalsh  
          Started by olisav57, Yesterday, 07:39 PM
          0 responses
          7 views
          0 likes
          Last Post olisav57  
          Started by trilliantrader, Yesterday, 03:01 PM
          2 responses
          22 views
          0 likes
          Last Post helpwanted  
          Working...
          X