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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        81 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        42 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        66 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