Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Market Replay vs Back Test results
Collapse
X
-
Originally posted by NinjaTrader_BrandonH View Post
-
Hello Malletto,
Thanks for your notes.
We do not have an update regarding the behavior reported to the development team at this time.
Further, we do not have an ETA regarding when they will be done investigating this matter.
Once the development team has finished looking into this behavior I will update this forum thread with their findings.
Leave a comment:
-
Hello Ymcapital,
Thanks for your notes.
The timestamps of Kagi bars in the Strategy Analyzer Chart display do not match the timestamps on a regular chart window.
This has been reported to the development team and they will be investigating this matter further. Once the development team is finished investigating this matter, I will update this forum thread with their findings.
Leave a comment:
-
Hey Brandon, I wanted to follow up on here to see what the outcome was with Malletto. I spent several weeks doing a deep dive into this and it appears there's a GROSS mismatch of timestamps with NinjaTrader's Kagi chart. Based on all my data, it's not the strategies fault. No matter how much intra-bar granularity you have, it will not improve the results. I have a script that has tick series built in and what it shows is that the time stamping of Kagi bars on NinjaTrader's end is what makes the results impossible to replicate in a live environment.
Is that the same conclusion that was reached with Malletto? If so, is there anything being done on the backend side to improve the mismatch in timestamps? Thanks for your help.
Leave a comment:
-
Hello Malletto,
Thanks for your notes.
When testing the strategy on minute bars there could still be discrepancies when comparing backtest results to realtime results unless you add intrabar granularity to your strategy.
Add intrabar granularity to your strategy if you want the backtest results to be more accurate.
See more about intra-bar granularity here.
https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/94098-isfirsttickofbar-vs-onbarclose-for-backtest-live?p=773377#post773377
If you cannot program the script to include intrabar granularity yourself, you could contact a professional NinjaScript consultant who would be happy to assist you.
You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more!
https://ninjatraderecosystem.com/sea...mming-services
Educators - https://ninjatraderecosystem.com/sea...ures=education
You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.
This NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
Leave a comment:
-
Ok. But is the normal minute timeframe the most accurate out of all charts
Leave a comment:
-
Hello Malletto,
Thanks for your notes.
We would not be able to say exactly how much of a discrepancy there would be. This would be dependent on multiple factors such as the logic of the script, the data you are testing on, the bar type being used, and more.
This is something you would need to debug and test on your own by following the notes mentioned in the forum thread linked on post # 100 which is also linked below.
https://forum.ninjatrader.com/forum/...nce#post100192
To improve the backtest intrabar granularity must be added to the script. With intrabar granularity coded into the script, the accuracy of the backtest would improve to within 1-tick.
See more about intra-bar granularity here.
https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/94098-isfirsttickofbar-vs-onbarclose-for-backtest-live?p=773377#post773377
Leave a comment:
-
Well how much of a discrepancy? Are my backtest results real on the 1 minute?
Leave a comment:
-
Hello Malletto,
Thanks for your notes.
Correct, the timestamps of the Minute bars on the Chart Display of the Strategy Analyzer match the timestamps of the Minute bars on the Chart window.
As discussed, the timestamps of the Kagi bars on the Chart Display of the Strategy Analyzer did not match the timestamps of the Kagi bars on a Chart window. The Development team is still looking into this and I will provide an update as soon as they have finished investigating.
That said, a certain level of discrepancy between realtime and backtest results would be expected for any bar types as noted in the help guide documentation linked below.
Please review the help guide document on the differences on real-time vs backtest (historical).
https://ninjatrader.com/support/help...bac.htm
To improve the accuracy of backtests, you would need to add intrabar granularity to the script. This is noted on the forum thread linked in post # 100.
See more about intra-bar granularity here.
https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/94098-isfirsttickofbar-vs-onbarclose-for-backtest-live?p=773377#post773377
Last edited by NinjaTrader_BrandonH; 12-28-2023, 09:04 AM.
Leave a comment:
-
Ok. So the normal minute timeframe should have no discrepancies? Like the issue with Kagi bars?
Leave a comment:
-
Hello Malletto,
Thanks for your notes.
As stated in the email thread we had opened, the reported behavior does not occur for time-based bars such as a 1-minute bar.
The Development team is still looking into the reported behavior regarding using Kagi bars and we do not have an ETA as to when they will be finished investigating this.
If you are seeing discrepancies when comparing backtest results to real-time results using minute bars, read through the forum thread linked below detailing comparing historcal, realtime, and playback results, add prints to the script that prints out ALL of the logic being used for calculations in the logic of the script, and test your strategy to see where differences might be. The forum thread below details how to accomplish this is contain a sample script you could view.
https://forum.ninjatrader.com/forum/...nce#post100192
Review this forum thread below demonstrating how to use prints to understand the behavior of a script's logic.
https://ninjatrader.com/support/foru...121#post791121
Leave a comment:
-
Ok. Is this an issue for the regular/normal time frame? Or just a Kagi issue
Leave a comment:
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by abelsheila, 05-14-2025, 07:38 PM
|
1 response
21 views
0 likes
|
Last Post
![]()
by hglover945
Yesterday, 08:17 AM
|
||
Started by nailz420, 05-14-2025, 09:14 AM
|
1 response
48 views
0 likes
|
Last Post
|
||
Started by NinjaTrader_Brett, 05-12-2025, 03:19 PM
|
0 responses
298 views
1 like
|
Last Post
|
||
Started by domjabs, 05-12-2025, 01:55 PM
|
2 responses
61 views
0 likes
|
Last Post
![]()
by domjabs
05-12-2025, 02:50 PM
|
||
Started by Morning Cup Of Trades, 05-12-2025, 11:50 AM
|
1 response
72 views
0 likes
|
Last Post
|
Leave a comment: