Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using ATMStrategyCreate

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

    Using ATMStrategyCreate

    So I followed the instructions here:




    When my strategy triggers it doesn't work if the ATM is not selected causing me to miss trades unless I select it on the drop down menu. Why is this?

    Thanks!


    #2
    Hello ttrader23,

    Which specific instructions are you referring to?

    Are you using a hard coded string for the Atm template name?

    Does the hard coded template string match the name of a saved Atm template exactly?

    Are you getting the AtmStrategy selector from Chart Trader and using the selected value?

    Included with NinjaTrader is the SampleAtmStrategy which demonstrates using AtmStrategyCreate().
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi, Yes I'm suing a hard coded string.

      Yes it matches the name of the Template exactly.

      Comment


        #4
        Hello ttrader23,

        Are there errors on the Log tab of the Control Center?

        Try using the same template string with copy of the SampleAtmStrategy included with NinjaTrader.

        Does this enable the atm when the entry fills?

        Are you generating unique strings for the entry order id and atm instance id using GetAtmStrategyUniqueId()?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi NinjaTrader Team
          I'm trying to use AtmStrategyCreate() and the "associated" methods like GetAtmStrategyUniqueIid(), GetAtmStrategyEntryOrderStatus(), etc. in a indicator instead of a strategy.
          In the documentation, it doesn't mention the fact that it cannot be done but I get an following compile error message: "the name AtmStrategyCreate() does not exist in the current context" (along with identical messages for the other methods).
          - Is there a workaround?
          - Can I use these methods in an indicator?

          Thanks for your help.

          Comment


            #6
            Hello z.franck,

            The AtmStrategy methods specifically are native to NinjaScript strategies only, however the Addon approach does have a way to start an Atm strategy.
            AtmStrategy.StartAtmStrategy(AtmStrategy atmStrategyTemplate, Order entryOrder)
            Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.


            I have a simple example of an addon starting an atm strategy.


            The 'AddOn Framework NinjaScript Basic' addon sample has much more sample code of starting and managing Atms.
            Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.


            The ProfitCaseStopTrailIndicatorExample provides a basis of accessing an account using the addon approach in an indicator.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Thank you Chelsea B. for this very detailed and precise response (as always)!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CarlTrading, 03-31-2026, 09:41 PM
              1 response
              77 views
              1 like
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              40 views
              0 likes
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              63 views
              2 likes
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              63 views
              0 likes
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              53 views
              0 likes
              Last Post CarlTrading  
              Working...
              X