Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Modifying order sent with StartAtmStrategy

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

    Modifying order sent with StartAtmStrategy

    Hi,

    I have a few goals here and wondering if someone could point me in the correct and proper direction!

    I create and submit orders, like this

    Code:
    ordername = "Entry";
    myOrder = myAccount.CreateOrder(myInstrument,OrderAction.Buy,OrderType.Limit,OrderEntry.Manual,TimeInForce.Gtc,defaultQTY,convertedPrice,0,"",ordername,Core.Globals.MaxDate,null);
    NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrategy(ATM, myOrder);
    This gets me an order entered with the ATM I want.

    Now, what I want to do, once that is filled, is have the following options

    Add another contract/increase the position to the running ATM by buying/selling more
    Move the exit and stop for the ATM
    Sell part of the position of the ATM via a limit order

    Thanks.

    #2
    Hello pjsmith,

    Thank you for the post.

    The items you mentioned are not possible with NinjaScript. ATM's manage their own targets/quantities, if you want to add more or control the targets you would need to use the addon methods directly to submit and control the orders yourself. An ATM would need to have a pre defined targets which it then controls.



    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse,

      I'm not sure this response was entirely correct because I've managed to do it via Ninjascript just fine. It may be that this is an unsupported, or non recommended way to do it, but it seems to work.

      For the benefit of anyone else trying to do this, I was able to loop through myAccount.Orders, examine each order item, and make appropriate changes with myAccount.Change just fine, even on running ATM's. I've been testing it and have not experienced any issues of yet.
      Last edited by pjsmith; 09-13-2019, 02:04 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 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