Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by llanqui, Today, 03:53 AM
    0 responses
    3 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    14 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    14 views
    0 likes
    Last Post strategist007  
    Working...
    X