Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Back testing

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

    Back testing

    Same strategy on replay and back testing has 4-5 points ( ticks) difference on entry and exits . its makes back testing almost irrelevant. .
    Why is such a huge difference
    Attached Files

    #2
    Hello,

    Do you have CalculateOnBarClose set to false in your strategy, by chance? Are you seeing the executions occur on different bars (one bar late in backtesting)?

    I look forward to your reply.
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Dave View Post
      Hello,

      Do you have CalculateOnBarClose set to false in your strategy, by chance? Are you seeing the executions occur on different bars (one bar late in backtesting)?

      I look forward to your reply.
      CalculateOnBarClose set to-- true . The settings are the same for both ( default ) . But when I run back test for last 4 trading days Im getting $2040 profit and same on replay gives me minus-$350
      So how do you explain such a difference ???
      Last edited by vit007; 04-23-2015, 03:25 PM.

      Comment


        #4
        That is interesting. Are you running the Market Replay at a very high speed, by chance? Market Replay can skip data when it is running at very high speeds, whereas the Strategy Analyzer will be using all data.

        If you are running Market Replay at a close-to-realtime speed, then I may need to test your code on my end to see what is going on. If so, please send me a full export of your code to platformsupport [at] ninjatrader [dot] com, and reference ticket # 1303256, so that I can investigate and test further.
        Dave I.NinjaTrader Product Management

        Comment


          #5
          Originally posted by vit007 View Post
          CalculateOnBarClose set to-- true . The settings are the same for both ( default ) . But when I run back test for last 4 trading days Im getting $2040 profit and same on replay gives me minus-$350
          So how do you explain such a difference ???
          The Strategy is running on Renko bars. You have to write your code to take care of the fake open of the Renko Bars. The only true data on a Renko bar is the Close.

          The fake open means that the Replay is running quasi-realtime, and is running on VERY DIFFERENT data from what is being used to calculate in the BackTest where the only available data is the OHLC data.

          That is the abiding problem of Renko Bars. What you see is not what you get. Renko does not show the travel of price; just a nice manufactured bar that depends on a quantum of relative movement from the previous close. So the nice picture of the low or high of the bar, very often (i.e., except in the middle of strong established trends), is not the extent of travel of price. Ergo, your nice picture is fake, and great at showing trading genius; the reality is very different.

          There are a myriad of posts about the Renko illusion. Just search the forum. Try the keywords: Renko and incorrect.

          Here are just a few of the threads that you will find.




          Support for the development of custom automated trading strategies using NinjaScript.

          Comment


            #6
            Originally posted by koganam View Post
            The Strategy is running on Renko bars. You have to write your code to take care of the fake open of the Renko Bars. The only true data on a Renko bar is the Close.

            The fake open means that the Replay is running quasi-realtime, and is running on VERY DIFFERENT data from what is being used to calculate in the BackTest where the only available data is the OHLC data.

            That is the abiding problem of Renko Bars. What you see is not what you get. Renko does not show the travel of price; just a nice manufactured bar that depends on a quantum of relative movement from the previous close. So the nice picture of the low or high of the bar, very often (i.e., except in the middle of strong established trends), is not the extent of travel of price. Ergo, your nice picture is fake, and great at showing trading genius; the reality is very different.

            There are a myriad of posts about the Renko illusion. Just search the forum. Try the keywords: Renko and incorrect.

            Here are just a few of the threads that you will find.




            Support for the development of custom automated trading strategies using NinjaScript.

            http://www.ninjatrader.com/support/f...ad.php?t=27293
            Thanks. Great explanation .

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by burtoninlondon, Today, 12:38 AM
            0 responses
            5 views
            0 likes
            Last Post burtoninlondon  
            Started by AaronKoRn, Yesterday, 09:49 PM
            0 responses
            14 views
            0 likes
            Last Post AaronKoRn  
            Started by carnitron, Yesterday, 08:42 PM
            0 responses
            11 views
            0 likes
            Last Post carnitron  
            Started by strategist007, Yesterday, 07:51 PM
            0 responses
            13 views
            0 likes
            Last Post strategist007  
            Started by StockTrader88, 03-06-2021, 08:58 AM
            44 responses
            3,983 views
            3 likes
            Last Post jhudas88  
            Working...
            X