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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    633 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    567 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X