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 GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,279 views
        0 likes
        Last Post Leafcutter  
        Started by WHICKED, Today, 12:45 PM
        2 responses
        19 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Started by Tim-c, Today, 02:10 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        5 views
        0 likes
        Last Post Taddypole  
        Started by chbruno, 04-24-2024, 04:10 PM
        4 responses
        51 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Working...
        X