Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cumulative Volume Plot

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

    Cumulative Volume Plot

    Is there a way to plot the cumulative volume as the day progresses?

    So on a 30 minute chart, I'd like to see the volume for the first 30 minutes of the trading session, then the volume for the first 60 minutes as the next plot, next 90 minutes and so on building to the daily volume.

    Any suggestions would be greatly appreciated. I am not a programmer though. Thanks...

    Leafsfan

    #2
    Hi leafsfan,

    Thanks for your note.

    While it would be possible to create this indicator, it would take custom programming to create.

    For example:

    In Initialize():
    Add(new Plot(Color.Blue, PlotStyle.Bar, "CumulativeVolume"));

    In OnBarUpdate():
    if (CurrentBar < 1)
    return;

    if (Time[0].Date != Time[1].Date)
    {
    volume = Volume[0];
    }
    else
    {
    volume += Volume[0];
    Value.Set(volume);
    }

    This code will accumulate the volume to the volume variable. If the bar date is not the same as the previous bar then you know its a new day and the variable is reset to the current bar volume.
    Last edited by NinjaTrader_ChelseaB; 10-25-2013, 09:42 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    85 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    48 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    67 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X