Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest ignores part of data in daily data

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

    Backtest ignores part of data in daily data

    Hi,
    I have a strange problem. When running a strategy with daily bars it only start using data from a certain point. For instance if I run backtest from 2007 to 2011 it starts working only from 2009, and I'll get results for 2009-2011. It starts at different points with different instruments (for instance ZS start from 2009 and ES from the end of 2007).
    I made sure that all data is available and I can see it the chart tub.
    When trying to run it with data feed connected it gives an error of invalid symbol for the first symbol it needs to use, even though it works perfectly fine with a sample strategy.
    When I run it in debug mode I see that the first OnBarUpdate() iteration skips the previous data and just start from a certain point (in my example the first bar will be 12/31/2009 when the from value is 1/1/2007).

    Please tell me what I can possibly be doing wrong.

    #2
    orenshkol, would this be a multi series strategy you're using here? What would be the first date then that all your series would have surpassed the BarsRequired you have set from the UI (usually 20 bars)?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks,
      I indeed had some multi-series piece of code buried in the strategy.

      Comment


        #4
        You're welcome, so with that being removed or BarsRequired adjusted to a lower value do you get a more consistent outcome now?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          With the code removed. Changing BarsRequired didn't have any affect.

          Comment


            #6
            orenshkol,

            What time frame are you working with on the second test from Betrand?

            Are you running a CurrentBar check of any kind for the OnBarUpdate()?
            Cal H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jxs_xrj, 01-12-2020, 09:49 AM
            6 responses
            3,290 views
            1 like
            Last Post jgualdronc  
            Started by Touch-Ups, Today, 10:36 AM
            0 responses
            9 views
            0 likes
            Last Post Touch-Ups  
            Started by geddyisodin, 04-25-2024, 05:20 AM
            11 responses
            62 views
            0 likes
            Last Post halgo_boulder  
            Started by Option Whisperer, Today, 09:55 AM
            0 responses
            8 views
            0 likes
            Last Post Option Whisperer  
            Started by halgo_boulder, 04-20-2024, 08:44 AM
            2 responses
            25 views
            0 likes
            Last Post halgo_boulder  
            Working...
            X