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 CarlTrading, Yesterday, 11:51 AM
    0 responses
    17 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, Yesterday, 11:48 AM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    21 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    13 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 03-23-2026, 11:13 AM
    0 responses
    20 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X