Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Historical Data and Marketreplay: Strategy not taking all trades
So I've been testing a strategy on market replay. I downloaded 20 days from the ninjatrader server, and as well downloaded the historical data for those same 20 days, (same instrument, same contract, same date/times). Then when I backtetsted that same strategy on the historical version, I got DIFFERENT results!
I checked the graphs, to make sure they lined up, and they did.
Then I went to look at the trades they took, and noticed that on the historical data some of the trades weren't being taken.
Mind you, this is the same strategy, with the same time-frame, same expiration, same dates, same chart.
What is going on? Can anyone enlighten me?
Has anyone come across something similar?
Can you help answer these questions from other members on NexusFi?
It's impossible to answer without the strategy logic.
You may add some debugging instructions in your strategy to get some clues. Simple Print() should be enough (high was X, indicator Z at bar Y say this, etc).
When running a backtest you only use the end of the bar for OnBarUpdate calculations. In replay/real time if you use "CalculateOnBarClose = false" then each of the OnBarUpdate calculations takes place in each tick.
The fills are different as well as stated in the link above.