Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
PF and Kagi
Collapse
X
-
Hello samish18,
Thank you for your post.
Advanced bar types like PnF and Kagi have issues running Calculate settings other than OnBarClose.
In backtest, there would not be a way to know how the bar formed (the way it did in real-time) so it is impossible to accurately fill an order - the same issue as Renko bars.
Consider point 1 from this forum post:
Please consider the nature of backtesting a PnF chart and the underlying inherent differences between real-time and backtesting exacerbated by this particular chart type. In real-time you are able to have your profit targets and stop loss fill based on actual price action inside that PnF column. In a backtest, you are unable to know the sequence of events that happened in that PnF column. It is not possible to pinpoint when your orders will be filled or even at what price as there is not enough granular information. In real-time your orders fill when the exact price action moves to your order’s prices. In a backtest we can only guess what happened based on end of column information. End of column information could contain information from a huge amount of time and the longer the column is you can see how the inaccuracies can become more apparent. This is not a bug and is simply the limitation of backtesting PnF charts. With imperfect information orders filling can be different than what happens in real-life trading.
You can help alleviate the discrepancy using 1-tick intrabar granularity. However like Renko bars it would be more accurate to use Market Replay to backtest.
-
Hello,
No, that is not how PnF bars work. The linked post explains how PnF bars work.
Also no, as explained complex bar types aren't ideal for backtesting in the Analyzer and it would be better to backtest using Market Replay. You could alleviate the discrepancy of backtesting in the Analyzer by implementing intrabar granularity however.
Comment
-
Hello samish18,
Intrabar granularity is needed regardless of Calculate setting, for any bar type. Intrabar granularity is not for intrabar actions. It is for higher accuracy order fills.
Tick Replay is for intrabar actions. Tick Replay isn't necessary if using OnBarClose.Last edited by NinjaTrader_Gaby; 10-15-2024, 06:19 AM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
56 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
132 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
73 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment