Time Anchored Cumulative TICK indicator For ThinkOrSwim

SmellyCat

New member
Anyone have a Time Anchored Cumulative TICK indicator?
I'd like to be able to quickly see this visually from say, Noon, or after the first Hour.
Any response or help is MUCH appreciated!!
 
Solution
# Cumulative TICK
# Mobius
# V01.06.2015

declare lower;

input TSYMBOL = {default "$TICK", "$TICK/Q", "$TICKA", "$TICKAC", "$TICKAR","$TICKARC","$TICKC", "$TICKC/Q","$TIKI", "$TIKIC", "$TIKND", "$TIKNDC", "$TIKRL", "$TIKSP","$TICKSPC","$TIKUS", "$TIKUSC"};
input openRTH = 0930;
input closeRTH = 1600;
input DisplayLabel = yes;
input AlertOn = yes;

def Active = if secondsFromTime(openRTH) > 0 and
secondsTillTime(closeRTH) >= 0
then 1
else 0;
def Tick = close(Symbol = Tsymbol);
def cumTick = if !Active
then double.nan
else if Active and !Active[1]
then Tick
else if Active
then cumTick[1] + Tick...
I may work on that... that's an interesting idea and I've been watching tick charts of late -- and liking what I see.

How would you go about using it? Just out of curiosity..

-mashume


EDIT
I found some code here:
https://usethinkscript.com/threads/anchored-vwap-indicator-for-thinkorswim.171/post-82000
that looks like it might work at a glance
Code:
#yakBro intraday anchoredVWAP excluding extended hours volume 2019 declare hide_on_daily;
 def anchorTime = 0930;
 def anchorEnd = 1600;
 input ShowTodayOnly = yes;
 def Today = if GetDay() == GetLastDay() then 1 else 0;
 def postAnchorTime = if SecondsFromTime(anchorTime) >= 0 then 1 else 0;
 def endAchorTime = if SecondsTillTime(anchorEnd) >= 0 then 1 else 0;
 #plot anchorVWAP for intraday def volumeSum = compoundValue(1, if postAnchorTime and endAchorTime then volumeSum[1] + volume else 0, volume);
 def volumeVwapSum = compoundValue(1, if postAnchorTime and endAchorTime then volumeVwapSum[1] + volume * vwap else 0, volume * vwap);
 plot anchorVWAP = if ShowTodayOnly and !Today then Double.NaN else if anchorTime then volumeVwapSum / volumeSum else Double.NaN;
 anchorVWAP.setStyle(Curve.Firm);
 anchorVWAP.setDefaultColor(Color.light_ORANGE);
 anchorVWAP.setlineWeight(2);
since this one excludes hours outside of RTH, it may be possible to change the anchor time and have it anchor to say 11:45 or whatever. The trick with tick charts seems to be that, since there is no guarantee that there will be a bar at the requested time, you need to do something like
Code:
secondsFromTime(1145) >= 0 AND secondsFromTime(1145)[1] < 0
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

# Cumulative TICK
# Mobius
# V01.06.2015

declare lower;

input TSYMBOL = {default "$TICK", "$TICK/Q", "$TICKA", "$TICKAC", "$TICKAR","$TICKARC","$TICKC", "$TICKC/Q","$TIKI", "$TIKIC", "$TIKND", "$TIKNDC", "$TIKRL", "$TIKSP","$TICKSPC","$TIKUS", "$TIKUSC"};
input openRTH = 0930;
input closeRTH = 1600;
input DisplayLabel = yes;
input AlertOn = yes;

def Active = if secondsFromTime(openRTH) > 0 and
secondsTillTime(closeRTH) >= 0
then 1
else 0;
def Tick = close(Symbol = Tsymbol);
def cumTick = if !Active
then double.nan
else if Active and !Active[1]
then Tick
else if Active
then cumTick[1] + Tick
else cumTick[1];
plot cT = cumTick;
ct.SetLineWeight(3);
cT.SetPaintingStrategy(PaintingStrategy.Points);
cT.AssignValueColor(if !isNaN(cT) and isNaN(cT[1])
then color.blue
else if cT > cT[1]
then color.cyan
else color.red);
plot zero = if isNaN(close)
then double.nan
else 0;
zero.SetDefaultColor(color.gray);
AddLabel(DisplayLabel, "TICK = " + Tick,
if TICK < 0
then color.red
else color.cyan);
Alert(AlertOn and ((TICK crosses above 800) or (TICK crosses below 800)), "TICK ALERT", Alert.Bar, Sound.Bell);
 
Solution

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
375 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top