Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accesing to "future" historical data in backtest

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

    Accesing to "future" historical data in backtest

    While backtesting a strategy I want to translocate bars of historical data, I mean, to alter the order of the bars for making calculations.

    There is no problem about store translocated bars in a new custom DataSeries, but some approaches of this procedure must be based on read "future" bars, I mean, if strategy are being executed on 10:10 AM in some cases at that time I will need to read the 10:30 AM bar value in order to make calculations.

    Is it possible in backtesting?

    #2
    Hello joseluisgilgil,

    In general, there is no concept of using future data in NinjaTrader, all data is processed from start to finish or left to right. The general suggestion if you need future data would be to wait for that data to be processed and then do your processing at that time. The Current processing bar would generally be the maximum into the future you can look, and then you can access all past data before that point using the BarsAgo system. In realtime you would also be unable to use future data so all historical tools work similarly. You can try using the GetValueAt method with a direct index to a future bars index but I generally wouldn't suggest trying to use future data as this is not a supported/documented feature of the platform.

    I look forward to being of further assistance.

    Comment


      #3
      Thanks for your quick response.

      Is there a method similar to GetValueAt that can be used with the OHLC series in NT 7? I have debugged all OHLC objects completely within a strategy, but even though they have a "Count" field set to the total number of bars, they are not available.

      Comment


        #4
        Hello joseluisgilgil,

        For NT7 there would be less I could suggest. The GetValueAt concept comes with NT8 specifically. There were ChartControl based conversion methods for bars but nothing documented/supported that I can provide. The concept of future bars has not been a concept in NinajTrader at this point. All processing has been from left to right in the previous versions.

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        87 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        132 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        65 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        118 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        67 views
        0 likes
        Last Post PaulMohn  
        Working...
        X