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 rhyminkevin, Yesterday, 04:58 PM
            5 responses
            62 views
            0 likes
            Last Post dp8282
            by dp8282
             
            Started by realblubb, Today, 09:28 AM
            0 responses
            2 views
            0 likes
            Last Post realblubb  
            Started by AaronKoRn, Yesterday, 09:49 PM
            1 response
            18 views
            0 likes
            Last Post Rikazkhan007  
            Started by ageeholdings, Today, 07:43 AM
            0 responses
            12 views
            0 likes
            Last Post ageeholdings  
            Started by pibrew, Today, 06:37 AM
            0 responses
            4 views
            0 likes
            Last Post pibrew
            by pibrew
             
            Working...
            X