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