$TICK Charts, Divergences, Labels, etc for ThinkorSwim

have a slightly different way of plotting tick, figured I'd post it here, also includes alerts when tick reaches specified threshold (default +/- 1000) and plots a vertical line when threshold is reached, plus labels for breadth ratio, put/call ratio, and vix:
X2pPKNV.png

the labels are dark due to markets being closed, but the blue represents the tick high, orange is tick low and green or red depends on if it closes above or below zeroline. I find it easier to see the slope of the $tick trend this way.
Code:
#[email protected]
declare lower;

input alerttype = Alert.BAR;
input alertsound = Sound.DING;
input alertThreshold = 1000;

plot zeroline = 0;
plot tick500 = 500;
plot tick500m = -500;
plot tick1000 = 1000;
plot tick1000m = -1000;

DefineGlobalColor("Vertical Line Color", Color.WHITE);

def NA = Double.NaN;
def ticko = open("$TICK");
plot tickc = close("$TICK");
plot tickh = high("$TICK");
plot tickl = low("$TICK");

def tickh1000test = tickh >= alertThreshold;
def tickl1000test = tickl <= -alertThreshold;
Alert(tickh1000test, " >+1000 $TICK", alerttype, alertsound);
Alert(tickl1000test, " <-1000 $TICK", alerttype, alertsound);
AddVerticalLine(tickh1000test, "+"+alertThreshold, GlobalColor("Vertical Line Color"));
AddVerticalLine(tickl1000test, "-"+alertThreshold, GlobalColor("Vertical Line Color"));

def PCALL = Round(close("$PCALL"),2);
def NYSEUVOL = close("$UVOL");
def NYSEDVOL = close("$DVOL");

def BR = Round(if NYSEUVOL >= NYSEDVOL then NYSEUVOL / NYSEDVOL else -(NYSEDVOL/NYSEUVOL),2);
AddLabel(1,"$TICK: "+ tickc, if tickc > 0 then Color.GREEN else Color.RED);
AddLabel(1,"BR: " + BR ,if BR > 0 then Color.GREEN else Color.RED);
AddLabel(1,"$PCALL: " + PCALL, Color.GRAY);
AddLabel(1, "VIX: "+ close("VIX"), Color.GRAY);

zeroline.SetDefaultColor(Color.BLACK);
tick500.SetDefaultColor(Color.GRAY);
tick500m.SetDefaultColor(Color.GRAY);
tick1000.SetDefaultColor(Color.GRAY);
tick1000m.SetDefaultColor(Color.GRAY);
tick1000.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
tick1000m.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
tick1000.SetLineWeight(2);
tick1000m.SetLineWeight(2);

tickh.SetPaintingStrategy(PaintingStrategy.Squared_HISTOGRAM);
tickh.SetDefaultColor(CreateColor(0,100,200));
tickl.SetPaintingStrategy(PaintingStrategy.Squared_HISTOGRAM);
tickl.SetDefaultColor(Color.DARK_ORANGE);
tickc.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
tickc.AssignValueColor(if tickc > 0 then color.green else color.red);
Any idea on why I cannot get this one to work?

Nothing displays.
 

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

Any idea on why I cannot get this one to work?

Nothing displays.
UsiphFz.png

The script that was referenced in your post seems "to work".

As you didn't provide any information about what you did or didn't do; providing further help is not possible.
When making future posts, it is important to understand what you did and where you did it.
It is requested that a DETAILED post of the steps taken be provided.
To better understand the issue, it is necessary to see what is being encountered.
Therefore, it is requested that the following be posted:
  • Always provide the code that was copied and pasted. Even if it is thought to be the same as the one on the forum, it still needs to be seen. There may be a missing part of the code that is causing the issue.
  • If you provide a chart link, members will be able to see what you are seeing (directions below).
  • Always provide a screenshot of the problem. Annotate the image, highlighting which widget you are working in, along with a more detailed written explanation. This will help others to better understand the question and provide more specific information to work with.
How To Create A Shared Chart Link
https://usethinkscript.com/threads/how-to-share-a-chart-in-thinkorswim.14221/


If unsure of how to upload screenshots to the forum, easy-to-follow directions are available at https://usethinkscript.com/threads/answers-to-commonly-asked-questions.6006/#post-58714
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
304 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