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 Max238, Today, 01:28 AM
    5 responses
    40 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by giulyko00, Yesterday, 12:03 PM
    3 responses
    12 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by habeebft, Today, 07:27 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_ChristopherS  
    Started by AveryFlynn, Today, 04:57 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by r68cervera, Today, 05:29 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X