Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Coding a ATM Strategy to enter for a Automated Strategy issue

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

    Coding a ATM Strategy to enter for a Automated Strategy issue

    Hi:

    I have put the code from here with the name of my particular ATM Strategy in and it works:

    http://www.ninjatrader.com/support/h...ket_replay.htm (at the bottom of this page).

    1. Ok, so it works and executes, but the issue is that it seems like every tick or so after the first entry it continues adding positions non-stop. For example, my ATM has 3 contracts. Once a signal fires and triggers the first Sell or Buy market order per the strategy, then it just keeps on (in the case of Buys)...buying 3 more, then 3 more, then 3 more etc etc etc (3,6,9 etc). Of course, I only want it to enter one time with only 3 contracts.

    How can I fix the that?



    Greg

    #2
    Hello,

    It sounds like you may need to make changes to your entries per direction: http://www.ninjatrader.com/support/h...rdirection.htm

    This will limit the number of orders that can be submitted.

    Additionally consider adding some logic that would prevent the EnterLong/Short() from being called every tick once its placed. You could have the OnOrderUpdate() set a variable to true/false once the conditions are met and order is placed: http://www.ninjatrader.com/support/f...ead.php?t=7499

    Please let me know if I can be of further assistance.
    LanceNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    637 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    366 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    572 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X