Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why does replay differ from real-time?

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

    Why does replay differ from real-time?

    Folks, it seems like you get this question of real time vs replay, of the different results between the two environments. I've read the help and forum information on the topic, but I'm still struggling.

    Here's two charts, from today (Sept 20th). In both charts, I'm running the same strategy. As you can see, the bar formation is the same in both charts. However, in one of these charts, I ran in real-time, and the other I ran in tick-by-tick replay. Despite running the same strategy, to apparently the same data, I get two different results. As you can see, two of the trades are the same, and two of the trades are different.

    Of course, I'm trying to wrap my head around this. In the end, what I want to do is reliably run back testing on tick-by-tick, and have it be accurate to my real time environment.

    Your thoughts and suggestions? Thanks.
    Attached Files

    #2
    Hello,

    Thank you for the post.

    As I am unable to see the timeframe you had used here I can only speculate. There can be differences in data if you are using tick based charts specifically meaning that if one chart were to begin at a different tick, this could cause differences in the results of your logic.

    To better understand what is happening here, you would likely need to add some debugging into your strategy to see if the conditions are being hit in the same way in both modes. This would also allow you to address data differences if any.

    You could start with a simple test to see if the data is starting at the same point by using prints in OnBarUpdate and just printing the Time[0] object. The first prints would let you know if historically the script had started on the same time or tick. If your script performs any historical logic, this would be very important. This would be a good first test to ensure the data being used is accurately the same. After confirming the data is the same, you could move further in your logic if needed to address any other differences in the way it is being executed.

    We have some common debugging tips at the following link: http://ninjatrader.com/support/forum...58&postcount=1

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by zacharydw00, Today, 05:14 PM
    0 responses
    7 views
    0 likes
    Last Post zacharydw00  
    Started by shahabjet1, Today, 04:47 PM
    0 responses
    13 views
    0 likes
    Last Post shahabjet1  
    Started by aligator, Today, 04:32 PM
    0 responses
    10 views
    0 likes
    Last Post aligator  
    Started by timko, Today, 04:02 PM
    0 responses
    9 views
    0 likes
    Last Post timko
    by timko
     
    Started by asmmbillah, Today, 03:37 PM
    2 responses
    18 views
    0 likes
    Last Post asmmbillah  
    Working...
    X