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 cmoran13, Yesterday, 01:02 PM
    0 responses
    29 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    21 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    160 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    95 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    148 views
    2 likes
    Last Post CaptainJack  
    Working...
    X