Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Close ATM programatically

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

    Close ATM programatically

    Hi,

    I am looking for a way to close positions and pending orders initiated by an ATM strategy.
    The ATM strategy trade is initiated manually and I do not know how to get the atmStrategyId to use it in the ATM Strategy Methods.

    Trades initiated manually, but looking to close from another strategy.
    I have the ATM template Name that will be used.
    Would you please help.






    #2
    Hello pvincent,

    Thanks for your note.

    NinjaScript strategies cannot see manually placed orders. They are only able to see orders that are placed by that specific instance of the strategy.

    You would need to create a NinjaScript strategy that places orders with an ATM Strategy template. You could then cancel any working orders and any open positions using the AtmStrategyClose() method.

    See the SampleAtmStrategy example script that comes default with NinjaTrader to see how to create a NinjaScript strategy that uses Atm Strategy Methods. To view the script, open a New > NinjaScript Editor window, open the Strategies folder, and double-click on the SampleAtmStrategy file.

    And, see this help guide page for more information about Atm Strategy Methods: https://ninjatrader.com/support/help...gy_methods.htm

    Let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      90 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      137 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      120 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X