Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AtmStrategy.StartAtmStrategy(atm, order) does NOT start ATM strategy

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

    AtmStrategy.StartAtmStrategy(atm, order) does NOT start ATM strategy

    In indicator class, using line AtmStrategy.StartAtmStrategy(atm, order) does not start Atm strategy. The order is created but does not submit, it hangs with "initialized" state.

    Adding line account.Submit(new[] { order }) does submit the order. But it is not associated with an Atm strategy.

    Order is created using Order order​ = account.CreateOrder(...)
    AtmStrategy atm = ChartControl.OwnerChart.ChartTrader.AtmStrategy;

    #2
    Originally posted by yubo27 View Post
    In indicator class, using line AtmStrategy.StartAtmStrategy(atm, order) does not start Atm strategy. The order is created but does not submit, it hangs with "initialized" state.

    Adding line account.Submit(new[] { order }) does submit the order. But it is not associated with an Atm strategy.

    Order is created using Order order​ = account.CreateOrder(...)
    AtmStrategy atm = ChartControl.OwnerChart.ChartTrader.AtmStrategy;
    Using StartAtmStrategy() requires the "name" argument in the CreateOrder()
    method be named "Entry" for the Atm Strategy to be started successfully.​

    Can you confirm you are doing this?

    Can you provide a minimal working indicator
    with the exact code that is causing this problem?​

    Comment


      #3
      Hello yubo27,

      Thanks for your notes.

      From the StartAtmStrategy() help guide page:

      "The "name" argument on the CreateOrder() method MUST be named "Entry" for the ATM Strategy to be started successfully."

      To clarify, are you setting the "name" argument to be "Entry" when calling CreateOrder() to create the order?

      If the "name" argument of the CreateOrder() method is not "Entry" then StartAtmStrategy() will not start.

      StartAtmStrategy(): https://ninjatrader.com/support/help...tmstrategy.htm
      <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


        #4
        Renaming order name to "Entry" solves the problem.
        But this kind of hard-coded condition is not a well-designed API. Order name could be anything, which is what I used to track which order is which.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        563 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        329 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X