Watchlist custom quotes: Cumulative volume from X time to Y time?


New member

I was wondering if there is any way you can get a value on watchlist that shows me the cumulative volume for a specific time period?
I have tried to change this to work in a watchlist column instead of what it is showing on chart.

for example:

input startTime = 1000;
input endTime = 1030;

def Active = SecondsFromTime(startTime) >= 0 and
SecondsTillTime(endTime) >= 0;
def v = volume;
def cumulative = if Active and !Active[1]
then v
else if Active
then cumulative[1] + v
else cumulative[1];

addLabel(1, cumulative);


I need to get a plot in there somehow, but everything i have done so far has not gotten me the result i am looking for.
Do i need to rethink the script or is it something else i need to consider to make this work?

i hope to get some feedback about this if possible.

thank you

Similar threads