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 burtoninlondon, Today, 12:38 AM
    0 responses
    5 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    14 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    13 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,983 views
    3 likes
    Last Post jhudas88  
    Working...
    X