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 Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            558 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X