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 Waxavi, 04-19-2024, 02:10 AM
    2 responses
    37 views
    0 likes
    Last Post poeds
    by poeds
     
    Started by chbruno, Yesterday, 04:10 PM
    1 response
    44 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Max238, Today, 01:28 AM
    1 response
    23 views
    0 likes
    Last Post CactusMan  
    Started by giulyko00, Yesterday, 12:03 PM
    2 responses
    10 views
    0 likes
    Last Post giulyko00  
    Started by r68cervera, Today, 05:29 AM
    0 responses
    4 views
    0 likes
    Last Post r68cervera  
    Working...
    X