• 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

Bar Index resets to 1 on Walk Forward (Strategy Analyzer)

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

    Bar Index resets to 1 on Walk Forward (Strategy Analyzer)

    Hi - I have a strategy that factors in the bar index via CurrentBar. In the Strat Analyzer this works great for a standard optimization - CurrentBar increments by 1 and I have a complete view of how many bars have elapsed since the strategy started. However on a walk forward analyis, the bar index resets back to 1 on the walk forward window, thus skewing the optimization that came before it.

    Short of creating my own custom index in my strategy, is there a way to determine how many bars have elapsed since the start of the stragy, and not just the start of the walk forward window? I'd like to track total number of bars from the start of the optimization to the end of the walk forward window.

    #2
    Hello dave416,

    For each iteration of a walk forward, this is a new test. The time period thats being tested will change, but the new test is starting at the begging.

    Can you further detail why you feel the value of CurrentBar should not reset on a new backtest?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      Originally posted by NinjaTrader_ChelseaB View Post

      For each iteration of a walk forward, this is a new test. The time period thats being tested will change, but the new test is starting at the begging.

      Can you further detail why you feel the value of CurrentBar should not reset on a new backtest?
      Well generally speaking, all the conditions present during optimization should be present, including data points. When things change arbitrarily during the walk forward window, results are skewed.

      Specifically, the bar indexes should not change or reset - simply by virtue of the fact that phenoenon doesn't happen during optimization, but also because there are strategies that could depend on this, including mine.

      Put another way, if the Wallk Forward feature didn't exist in Ninjatrader, a user would need to do a regular optimization on a date range in the past, set those parameters in the strategy, then perform a back test on an extended date range in the future - I would expect the Walk Forward feature to behave in the same way. \

      I hope that helps!

      Comment


        #4
        Hello dave416,

        I'm not sure that I am understanding. If a user did regular backtests on different date ranges, each backtest would have CurrentBar start at 0 for whatever is the first bar in that date range.

        Could further clarify what I'm not understanding. How would this be different than what the optimization is doing?
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ajsdnyyrr1234DDf, Today, 09:39 AM
        0 responses
        5 views
        0 likes
        Last Post ajsdnyyrr1234DDf  
        Started by afoschini, Today, 09:18 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by rexsole, Today, 08:02 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by johnnybegoode, Yesterday, 07:06 PM
        1 response
        18 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by johnnybegoode, Yesterday, 10:06 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X