Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Back Testing with Automated Order Entry

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

    Back Testing with Automated Order Entry

    I have ATM Strategies I want to back test over multiple days using Playback. In an effort to NOT have to stop and start 90 times, I would like to automate the ATM entry process if possible. For instance, I would like to automatically place 1 order (using the ATM) everyday at 6pm EST. I would then like to automatically close all remaining orders at 3:30pm the next day. Then, start over again when the Market opens at 6pm. Wash, Rinse & Repeat for 90 days.

    There has to be a way to do this. Any help, suggestions, guidance or cyanide pill would be greatly appreciated!

    Thanks,

    Bob

    #2
    Hello Bob,

    Thanks for your post.

    You could consider implementing a Time filter in your strategy to limit when orders are placed by the strategy.

    A Time Comparison could be used to check if the Time is 3:30PM and you could call AtmStrategyClose() to cancel any working orders and close any open position of a strategy using the default ATM strategy close behavior.

    It would be up to you to program custom logic that repeats the behavior for 90 days in a row. You could do some research on using C# DateTime to repeat a behavior for 90 days.

    See the help guide documentation below for more information.

    Time Filter: https://ninjatrader.com/support/help...ateTimeFilters
    Time Comparison: https://ninjatrader.com/support/help...imeComparisons
    Time: https://ninjatrader.com/support/help...eries_time.htm
    Atm Strategy Close: https://ninjatrader.com/support/help...ategyclose.htm
    Atm Strategy Methods: https://ninjatrader.com/support/help...gy_methods.htm
    Using Atm Strategies in custom NinjaScripts: https://ninjatrader.com/support/help...strategies.htm

    Let me know if I may assist further.
    <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

    Latest Posts

    Collapse

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