Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Recognizing rollover dates in backtest

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

    Recognizing rollover dates in backtest

    Hi,
    So when running backtest with MergeNonBackAdjusted the Strategy Analyzer switches between Maturities according to the Rollover Dates specified for the Instrument. I wish that the strategy will recognize these dates and don't trade on them.

    For example: The ES roll over from 'ES 12-15' to 'ES 03-16' on the 12/10/2015, I wish that the strategy will recognize that the 12/10/2015 is rollover date and will not trade on that day.

    How can this be accomplished?

    One solution I can think of is to test what is the current running maturity (12-15 or 03-16) and to check if it has changed, but I can't find where I can access the current maturity.
    Another is to directly access the Rollover Dates from the strategy itself, but I don't how that can be done.

    #2
    Hello orenshkol,

    In NinjaTrader 7, you would need to create a list of rollover dates. I am not aware of a way to query these from the NinjaTrader database, which means you would need to create this list.

    Then in the code, if the current bar's date is equal to a date in your list, use a return to prevent the script from processing.

    In NinjaTrader 8, support has been added to provide a collection of the rollover dates.
    http://ninjatrader.com/support/helpG...collection.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    79 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    66 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X