Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Redrawing Indicator & Backtest Results

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

    Redrawing Indicator & Backtest Results

    Hey guys, I did some backtesting and some forward testing results with a strategy that uses the DM indicator. I think the difference between forward testing and backtesting is caused by the fact that DM indicator that comes with NT redraws itself with each bar update. How do I prevent this so that the backtest results and forward test results match up?

    Thanks,
    EliteTradernyc

    #2
    Hello EliteTradernyc,

    Thank you for your post.

    Are you looking to have static values for each bar historically for your backtesting?

    All indicators will calculate on the close of a bar historically, and in real-time you can choose to use CalculateOnBarClose = False so that the indicator calculates on each incoming tick.

    I look forward to your response.

    Comment


      #3
      Hi Sir, yes CalculateOnBarClose = True for the strategy. I want it to be calculated on bar close for the indicator and all related values, but most importantly, I would like the forward test results to be equal to the backtest results.

      Comment


        #4
        Hello EliteTradernyc,

        Thank you for your response.

        Can you clarify on your meaning behind seeing the forward test results equal the backtest results?

        I look forward to assisting you further.

        Comment


          #5
          Sure, so for example, today I ran a forward test on the SIM101 account with my strategy on S and P 500 stocks like MCD, MS, QCOM, C , etc. I ran the strategy for the entire day between 930 am and 4pm. After the 4pm close I then ran a backtest to see if the backtest results would match the forward test results exactly for the entire day, the same entries exits. So in some cases the results matched exactly but in most cases the entries were different. I think the reason is because I am using the DM indicator which redraws itself.

          Comment


            #6
            Hello EliteTradernyc,

            Thank you for your response.

            I do not believe this is in relation to the DM indicator. Please review the following link for information on discrepancies between Real-Time Data and Backtesting and please let me know if you have any questions: http://www.ninjatrader.com/support/h...ime_vs_bac.htm
            Last edited by NinjaTrader_PatrickH; 06-06-2013, 10:54 AM.

            Comment


              #7
              Hey guys is it possible that the lookback period could be causing the descrepancy? for example, infinite versus 256?

              Comment


                #8
                Hello EliteTradernyc,

                Thank you for your response.

                This should not effect the results however, are you using Infinite in real-time or backtesting but using 256 on the opposite?

                In addition, how far back are you running the backtest? Is it the same amount of days as you have set in real-time for DaysToLoad?

                I look forward to assisting you further.

                Comment


                  #9
                  Hi sir, I respectfully disagree with your opinion below. It appears that the way that the DM indicator is drawn in past periods skews the backtest versus forward test results. I was able to code a workaround by cacheing the values of the DM indicator within the strategy and also I was able to stop this behavior by only considering the values at the 0 timeframe and ignoring previous values.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  647 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  369 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  108 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  572 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  573 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X