Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer vs. Real Time

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

    Strategy Analyzer vs. Real Time

    I've encountered a problem that I cannot seem to figure out. I will try my best to describe it.

    I have a multi-instrument strategy. With this strategy I have done two things:
    1. Back tested in Strategy Analyzer on a 45 minute period.
    2. Opened 45 min chart and implemented same strategy.

    The strategy analyzer backtest and the real time strategy do not match up only for the current day. From "yesterday" and beyond - no problems as both entry/exits match.

    For example, here is what I do each day.
    1. Before I go to bed I open 45 min SPY chart and start my strategy.
    2. I wake up and leave for the day.
    3. When I get home, after market close, I look at the entry and exit alerts from the real time strategy as well as include the current day in a backtest. With all the parameters and settings seemingly the same, the entry/exits are different. From the previous day and beyond the entry/exits are the same.

    I have selected identical session times in the backtesting and real time. 6:30 AM - 1:00 PM. Therefore for a 45 min strategy my first bar is supposed to be generated at 7:15 AM.

    I believe there is something simple that I am overlooking but I cannot figure it out. The instruments I am using from the BarChart data feed updates approximately once every minute.

    Any ideas?

    #2
    Hello,

    Backtesting is significantly different from forward testing. This link will help explain why:
    DenNinjaTrader Customer Service

    Comment


      #3
      Thanks Ben for the quick reply. I followed the link you have provided and have a few more questions.

      I am using the BarChart data feed.
      1. Am I correct in assuming the incoming ticks are already time stamped?
      2. If so, would realtime and historical OHLC data be the same?
      3. If data time stamped already would my PC re-build the time stamping?

      My problem isn't so much different bid/ask prices which affect the fills, but rather it is missing entrys and exits all together. I am using CalculateOnBarClose = true in my strategy. Minor price differences on 1 minute bars shouldn't alter my enter/exits significantly on a 45 minute chart or at least as much as I'm seeing every day. If so, what is the point of backtesting??

      There hasn't been a day yet where there wasn't a major difference, (albeit run only for a few days). That I cannot understand.

      Do session times and/or "exit on close" work differently on backtesting vs. real time? I still feel like I'm missing something simple.

      Comment


        #4
        Hello,

        There will be differences in backtesting and live testing. The severity of differences depend on the strategy.

        1- I believe historical data is, but live incoming recorded data is locally stamped.
        2- Not all of the time.
        3- I don't understand your qestion.

        The usefulness of backtest is debated by many. Most find it useful if the startegy is build correctly.

        I suggest using Print() statements and diving into the details of your startegy and the trades it is making to fully understand why things are happening the way they are.
        DenNinjaTrader Customer Service

        Comment


          #5
          Thanks Ben. My strategy has two instruments and one input (period) so it is fairly basic. I will use some print() statements to try and and figure out what it going on and monitor it this week.
          Last edited by eleven; 07-12-2009, 01:36 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          648 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