Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 philmg, Today, 01:17 PM
    0 responses
    2 views
    0 likes
    Last Post philmg
    by philmg
     
    Started by cre8able, Today, 01:01 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by manitshah915, Today, 12:59 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by ursavent, Today, 12:54 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Mizzouman1, Today, 07:35 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X