Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Minimum number of bars needed before OnBarUpdate works

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

    Minimum number of bars needed before OnBarUpdate works

    Hi,

    When creating an indicator which loads historical data, I've noticed that at least 21 bars need to be loaded before OnBarUpdate is triggered. (I am setting the 'Last Date' and then adjusting 'Bars back'.) Unless the latter is a number 21 or greater, it appears that OnBarUpdate is not processed. This can be verified by including a print statement within OnBarUpdate and watching the output in the window. The phenomenon persists whether the data is daily or weekly or I change my 'Last Date'.

    Is this a bug, a feature (some limit set somewhere?) or am I missing something here? When I am ready to trade live, does this mean I will have to wait at least 21 bars into the trading period before my indicator becomes active?

    I am using the free version of NT 6.0.1000.7.

    many thanks for the help

    and happy new year!

    #2
    In Chart Properties, try setting "Show unstable period..." to a value of true, does that make a difference?
    RayNinjaTrader Customer Service

    Comment


      #3
      It worked!

      Sorry about that. I'm new to NT and have read through the help but obviously didn't read thoroughly enough.

      I really appreciate the speedy response.

      thanks Ray

      Comment


        #4
        No problem...Welcome to NinjaTrader
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        156 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        76 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X