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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    60 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    145 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    283 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X