Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AtmStrategyStart - where can I find the AtmStrategyId?

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

    AtmStrategyStart - where can I find the AtmStrategyId?

    Hi,
    I'm creating an AtmStrategy from an indicator, by setting up an order using Account.CreateOrder() and then using NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy(templateName, order);

    This works very well. The AtmStrategy fills and proceeds to manage its position without any further ado from my code.


    But, if I now want to control the stoploss and target myself, how can I do that? I need to know the AtmStrategyId string so that I can use the AtmStrategyChangeStopTarget() method.
    The StartAtmStrategy() returns an instance of AtmStrategy, which contains some information but NOT the AtmStrategyId string. Is there a way to get that string?

    An alternative would be to change the orders directly in the account. I have tried that by finding the orders and setting the StopPrice of the order to a new value then using Account.Change(ordersList) but I'm not seeing the orders change. Perhaps the AtmStrategy overrides the changes - I don't know for sure.

    Thanks in advance for any assistance,
    saltminer

    #2
    Hello saltminer,

    Thanks for your post.

    A unique Atm strategy id will have to be created and assigned to the atmStrategyId parameter in AtmStrategyCreate() for the Atm strategy to have an appropriate id. This is usually done using GetAtmStrategyUniqueId() to generate a unique Atm strategy id.

    You may see the SampleAtmStrategy example that comes with NinjaTrader for a walk through on creating a NinjaScript strategy that initiates Atm strategies. I've also included links to our associated documentation for further reading.

    AtmStrategy Methods - https://ninjatrader.com/support/help...gy_methods.htm

    Using Atm Strategies with NinjaScript - https://ninjatrader.com/support/help...strategies.htm

    Please let us know if we can be of further assistance.

    Comment


      #3
      He said "from an indicator"
      Same applies from an Addon, this is related to Ticket ID: SFT-2511)
      pmaglio
      NinjaTrader Ecosystem Vendor - The Indicator Store

      Comment


        #4
        Thanks pmaglio,

        Yes, we only offer support for manipulating Atm Strategies through NinjaScript strategies that initiate them. We do not have any documentation or advise for manipulating Atm Strategies from an AddOn once initiated. SFT-2511 is the feature request ticket id tracking interest on this.

        @saltminer, I'll make sure your interest is tracked on this feature request as well.

        Interested is collected with feature requests before it is considered to be implemented, so we cannot offer an ETA. The ticket id number will be noted in the help guide if it is implemented.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        580 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        335 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        102 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X