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 CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    24 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    121 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    92 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    136 views
    0 likes
    Last Post cmoran13  
    Working...
    X