Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question with OnBarUpdate()

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

    Question with OnBarUpdate()

    Suppose I have a strategy trading on 1min bar series of ES and my session is set as 12:00-12:00. CalculateOnBarClose is set to true.

    ES trading is stopped between 16:15 and 16:30 ET. Do I receive calls of OnBarUpdate() during this time period?

    #2
    Welcome to our forums - NinjaTrader is event based, so if the market is down in this period and no ticks are received then you would not see an OnBarUpdate() call during this time.

    Comment


      #3
      update frequency when set to FALSE

      Hi NT_

      .I have a weekly indicator with calculateonbarclose set to FALSE; can i adjust or update the (check) frequency of the times it will update the values? I do not need for it to update on every "tick", but also do not want to wait until the BAR closes...(daily/weekly/monthly)

      for instance; update twice a week for weekly values... (twice a month for monthly values.... twice a day for daily values....)




      using NT6.5 with sessions 12:00am to 12:00am
      Last edited by mystiq; 05-18-2011, 11:56 PM. Reason: edit

      Comment


        #4
        Hello mystiq,

        Yes, this is possible. You still want to use COBC = false, but within OnBarUpdate you add an additional filter to control when you wants things processed. This could be with a timer object or something you custom code. This sample can help using timer objects:

        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        68 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        61 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X