Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest data: not 20 bars from first strategy operation

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

    Backtest data: not 20 bars from first strategy operation

    Hi,

    I was backtesting over a 3 month period of 1/Oct-31/Dec using only 1min bar data. I then added daily bars as a second time frame by using Add(PeriodType.Day, 1). The code was otherwise unchanged. I then added 20 working days to the backtest date range because I know that I will not get any output until after the first 20 bars of data and as I have now added daily data, that means adding 20 days to the start of the backtest data set. However, my log info did not start on the 1/Oct as expected and through trial and error I found that I had to include data back to 15/Aug to ensure that log information began on 1/Oct. This is 33 working days before the 1/Oct? That's not much to go on but what might be my issue here?

    Thanks in advance,
    darmbk.

    #2
    darmbk, that could actually be the case since you would need to have 20 daily data points running with the default BarsRequired setting of 20 for your script and factoring weekends and holidays it could need more calendar days to satisfy this requirement. You could either add then more data in or set BarsRequired lower to adjust.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand,

      Thanks for you response. If I currently have 'min bars required' set to the default of 20 and ignoring any coding errors, is there any high level reason I might not get results if 15/Aug-1/Oct is 33 weekdays?

      Thanks,
      darmbk.

      Comment


        #4
        You could an easy test here to further isolate out, if you force BarsRequired really low, any change in the outcome seen then for your script?
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Dyoser, Today, 12:09 PM
        0 responses
        2 views
        0 likes
        Last Post Dyoser
        by Dyoser
         
        Started by PH_GMT, 02-12-2025, 12:40 PM
        6 responses
        37 views
        0 likes
        Last Post PH_GMT
        by PH_GMT
         
        Started by defa0009, 12-13-2024, 09:19 AM
        24 responses
        266 views
        1 like
        Last Post adtsystems  
        Started by gustavobp, Yesterday, 05:30 AM
        2 responses
        20 views
        0 likes
        Last Post gustavobp  
        Started by preqc, 04-10-2022, 01:26 PM
        2 responses
        208 views
        0 likes
        Last Post mixedbyclaudio  
        Working...
        X