Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting today's total volume

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

    Getting today's total volume

    Is there some trick to getting all of today's volume? I can iterate over all bars and add them together, but it seems like there should be a better way.

    I tried adding a daily period and checking Volumes[1][0] but when I check this value on successive 5min bars, the value doesn't change, even after toggling CalculateBarsOnClose.

    Bars.GetSessionBar(0).Volume has the same problem (and the online help specifically says we shouldn't reference (0) of GetSessionBar). The CurrentDayOHL() looks like it should be the place to go, but it doesn't have a .CurrentVolume property.

    Any ideas?

    #2
    I would just accumulate the Volume in a variable for every intraday bar if you are working in intraday time frames.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    635 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    567 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    569 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X