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 ageeholdings, Today, 07:43 AM
    0 responses
    6 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    12 views
    0 likes
    Last Post burtoninlondon  
    Working...
    X