Cumulative Volume Watchlist Column for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
Here is a watchlist column that shows cumulative volume during an active period.



Code:
# Archive Name: Volume - Cumulative Volume During An Active Period_Mobius
#  Archive Section: Watchlists
# Suggested Tos Name: Volume_CumulativeActivePeriod_Mobius

# Cumulative Volume During An Active Period
# Mobius
# Chat Room Request 05.01.2018

input startTime = 0930;
input endTime = 1600;

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, "Volume = " + cumulative, color.white);
Credits:
 

Similar threads

Top