#Cumulative TICK (All Symbols)
#TICK Symbols List:
#$TICK – NYSE
#$TICKC – NYSE composite
#$TICK/Q – Nasdaq
#$TICKC/Q – Nasdaq composite
#$TIKRL – Russell 2000
#$TIKRLC – Russell 2000 composite
#$TIKI – DJIA
#$TIKIC – DJIA composite
#$TIKND – Nasdaq 100
#$TIKNDC – Nasdaq 100 composite
#$TIKSP – S&P 500
#$TIKSPC – S&P 500 composite
#$TICKA – Amex
#$TICKAC – Amex composite
#$TICKAR – ARCA
#$TICKARC – ARCA composite
#$TIKUS – All USA
#$TIKUSC – All USA composite
declare lower;
input TickType = {default "$TICK", "$TICKC", "$TICK/Q", "$TICKC/Q", "$TIKRL", "$TIKRLC", "$TIKI", "$TIKIC", "$TIKND", "$TIKNDC", "$TIKSP", "$TIKSPC", "$TICKA", "$TICKAC", "$TICKAR", "$TICKARC", "$TIKUS", "$TIKUSC"};
def value = (hlc3(TickType));
plot data = value;
data.SetPaintingStrategy(PaintingStrategy.LINE);
data.assignValueColor(color.CYAN);
def tickData = (hlc3(TickType));
rec CT = if GetDay() != GetDay()[1] then 0 else if SecondsTillTime(930) <= 0 and SecondsTillTime(1600) >= 0 then CT[1] + tickData else 0;
plot cumulativeTick = if !IsNaN(tickData) then CT else Double.NaN;
cumulativeTick.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
cumulativeTick.AssignValueColor(if cumulativeTick < cumulativeTick [1] then Color.DOWNTICK
else Color.UPTICK);
cumulativeTick.SetLineWeight(4);
def newDay = GetDay() != GetDay()[1];
AddVerticalLine(newDay, "", color.DARK_GRAY, curve.FIRM);
plot zero = 0;
zero.AssignValueColor(GetColor(4));
zero.HideBubble();
zero.HideTitle();