Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest Execution Time = Bar Close

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

    Backtest Execution Time = Bar Close

    Hi,

    I'm analyzing a 4-hour forex strategy backtest. When I go to the Executions tabs and I look at the trades, the Time column got my attention. I think the Time column shows the time of the bar-close instead of the actual time of the trade.

    Example: my strategy closes a position on the 4-hour at 3pm realtime. When I analyze the results in the backtest, the Time column will actually show 7pm, because that is the closing-time of the bar that the trade was actually closed in. Probably the trade was filled at 3:00:02pm so the close of that actual bar is 7pm.

    So my question is: is there a way to either show the Time-start of the column in which the trade was closed? Because now I have to remember to look at the open of the next bar, because that's where the actual trade was actually filled. Not the close of the previous bar.

    #2
    Hello siroki,

    Thank you for your post.

    Order executions occur on the close of the bar in backtesting as backtesting is performed on the historical data. Historical data is only the close of the bar and not every tick that build it. If you want to simulate intra-bar fills you can look at the reference sample at the following link: http://www.ninjatrader.com/support/f...ead.php?t=6652

    For information on the differences between real-time and backtesting please visit the following link: http://www.ninjatrader.com/support/h...ime_vs_bac.htm

    Please let me know if I may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    56 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    37 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    17 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    19 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    49 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X