Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RELIABLE way to Place Stop@EndOfDay for execution on open NextDay in backtest mode?

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

    RELIABLE way to Place Stop@EndOfDay for execution on open NextDay in backtest mode?

    Hello,

    Is there a reliable way (in backtest mode) to place a Stop Order at the end of the day for execution on the open (8:30 AM for the mini S&P, with a Close Time of 3:15 PM) the next day, even for markets that aren't guaranteed to have a 1 minute bar in the last minute of the session?

    I am currently doing this by placing the Stop Order OnBarUpdate() of the 1 minute bar series (The 0th data series in a Multi-Timeframe strategy), if the following is true of the 1 minute bar:

    Convert.ToDateTime(Times[0][0]).TimeOfDay.TotalMinutes == DateTime.Parse("1/1/2000 3:15 PM").TimeOfDay.TotalMinutes

    The problem, is that what if the 3:14 - 3:15 PM time range has no data?... Then my orders would not get placed for the next day.

    I want to ensure that the order can get executed even on the 8:30-8:31 AM bar, not wait until the 8:31-8:32 AM bar.

    Any ideas on a method I can use to guarantee placement for execution on the open of the next day?

    Thanks in advance!

    ChiTrader2000
    Last edited by ChiTrader2000; 12-24-2008, 01:06 PM.

    #2
    Just place the trade on the last bar and it will execute on the next day provided you have the proper TIF set. If it has no data at that time there is nothing you can do. Suggest you just use intrabar granularity. Submit at the opening bar the next day, but with a higher granularity time frame so it gets filled. Please see the reference sample in that section of the forum discussing this.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 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
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X