Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Volume Bars Calculation

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

    Volume Bars Calculation

    I'm building an indicator that processes every tick on a 5000 volume bar chart.

    I'm trying to understand how the onmarketdata() method is handled towards the end of a volume bar being fulfilled. Say its at 4900 volume complete and the next tick to come in has a volume of 500.

    How will the method process in this case? Will the method calculate on the 4900 bar? Or will it calculate on the new bar? Or will it split 100 volume off and calculate the 5000 bar and then calculate again on the new 400 bar?

    Thanks.

    #2
    Tight Face, the OnMarketData() method is called for every Level 1 change, thus if the bar is finished or not would not be relevant for it's call.

    For the OnBarUpdate() in the situation you describe you would see it call at the end of the 5000 Volume bar, 100 contracts added to the 4900 bar to complete it and then the next bar start with the remaining 400 contracts.

    Comment


      #3
      Bertrand, thanks for the clarification.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      574 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      332 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
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X