Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Are calls OnBarUpdate synchronized ?

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

    Are calls OnBarUpdate synchronized ?

    I would like to ask, if the handler OnBarUpdate() is synchronized on the running
    instance of strategy, or there can run more invocations of this method paralelly?

    #2
    Hello misova,

    Thank you for your post.

    The OnBarUpdate() is called for the bar series that the strategy is applied to and the added bar series in the code. Any bar update will call the OnBarUpdate() method, any bar update from a bar series the strategy is applied to or added in the code.

    You would use BarsInProgress to determine the series calling the OnBarUpdate(). For information on BarsInProgress please visit the following link: http://www.ninjatrader.com/support/h...inprogress.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      Thankx, but my main question was,
      if some previous/or already running invocation of OnBarUpdate() is guaranteed to be finished before another one invocation of OnBarUpdate() can be started?
      Last edited by misova; 12-08-2014, 05:54 AM.

      Comment


        #4
        misova, the processing is done sequentially - so you would not have to concerned with the threading model here for NT7.

        Comment


          #5
          Thank you, that is what I needed.

          Just extreme example to confirm my understanding:

          Do I understand it correctly?, that if processing one OnBarUpdate() would take
          10 minutes (and trading 1-minute bars), then I would completely slowed down
          the whole processing like this:

          • 1st OnBarUpdate() -- called immediately, takes 10 mins to finish
          • 2nd OnBarUpdate() -- called after finishing previous, starts at T+10min, takes also 10 mins
          • 3rd OnBarUpdate() -- called after finishing 2nd, starts at T+20min
          • 4th OnBarUpdate -- called after finishing 3rd, starts at T+30min


          It is clear, that such extremely heavy processing is not expected, but just to confirm the understanding how things really work under the hood of NT7..
          Last edited by misova; 12-08-2014, 08:09 AM.

          Comment


            #6
            Correct, it would be queued then and processed in sequence.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            65 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            149 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            162 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            99 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            286 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X