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

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.
    JesseNinjaTrader Customer Service

    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 wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      26 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 02-22-2024, 01:11 AM
      5 responses
      32 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, Yesterday, 09:53 PM
      2 responses
      49 views
      0 likes
      Last Post wzgy0920  
      Started by Kensonprib, 04-28-2021, 10:11 AM
      5 responses
      192 views
      0 likes
      Last Post Hasadafa  
      Started by GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,235 views
      0 likes
      Last Post xiinteractive  
      Working...
      X