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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      70 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X