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 TraderBCL, Today, 04:38 AM
        2 responses
        8 views
        0 likes
        Last Post TraderBCL  
        Started by martin70, 03-24-2023, 04:58 AM
        14 responses
        105 views
        0 likes
        Last Post martin70  
        Started by Radano, 06-10-2021, 01:40 AM
        19 responses
        606 views
        0 likes
        Last Post Radano
        by Radano
         
        Started by KenneGaray, Today, 03:48 AM
        0 responses
        4 views
        0 likes
        Last Post KenneGaray  
        Started by thanajo, 05-04-2021, 02:11 AM
        4 responses
        471 views
        0 likes
        Last Post tradingnasdaqprueba  
        Working...
        X