Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar Close

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

    Bar Close

    I am running a backtest in NT7 with historical Kinetick daily bars.
    I use CalculateOnBarClose = true and want my strategy to give me a trading signal (Print statement) after market close that is based on all recent historical bars. I can then place a manual order before the market opens.
    The problem I am facing is that closing of yesterdays bar immediately exits the program and does not trigger any instructions any more. So, the most recent trading signals I get are based on the close of the day before yesterday and not yesterday.
    What can I do to have my strategy execute instructions that include yesterdays close?

    #2
    Hello PaulZ,

    Thanks for your post.

    Using daily bars in a backtest and you need to get the most recent close will require you to run the strategy with CalculateOnBarClose = false. Please note that because these are historical bars your strategy will continue to run as if CalculateOnBarClose were true but to get the very last bar means you need to you CalculateOnBarClose = false.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    57 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X