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 NullPointStrategies, Today, 05:17 AM
              0 responses
              25 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              121 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              64 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              41 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              46 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X