Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,223 views
        0 likes
        Last Post xiinteractive  
        Started by andrewtrades, Today, 04:57 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        7 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        438 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        10 views
        0 likes
        Last Post FAQtrader  
        Working...
        X