• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    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 superkolleech, Today, 12:46 AM
        1 response
        10 views
        0 likes
        Last Post MojoJojo  
        Started by davidwade, Today, 02:51 AM
        0 responses
        2 views
        0 likes
        Last Post davidwade  
        Started by aviat72, 04-26-2020, 09:41 PM
        10 responses
        91 views
        0 likes
        Last Post kissandfly  
        Started by healthooa, Today, 01:28 AM
        0 responses
        7 views
        0 likes
        Last Post healthooa  
        Started by harjinderjit, Yesterday, 08:24 PM
        0 responses
        20 views
        0 likes
        Last Post harjinderjit  
        Working...
        X