Status Of Your Favorite Upper Chart Indicator In ThinkOrSwim

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
If you want to know how your favorite watchlist stands in relation to your favorite upper chart indicator, here is how to do it.

Ruby:
# Watchlist

def trigger = average(close,200);
plot pct = round((close / trigger)-1,2)*100;

assignBackgroundColor(
if close>close[1] then color.cyan else
color.orange);
You need to replace the def trigger.
Use whatever you are keeping an eye on: moving average? support/resistance? atr? Feel free to plug in whatever you want.

What does the watchlist column tell you?
0YCeaap.png

kFx28zR.png

So @pegasis watches when SPY and other stocks are above their 200sma.
The above watchlist shows that all but one are greater than zero.
That means all but one are above the 200sma.

Let's look at the details:
SPY is 6% over its 200sma, but the price is dropping (colored orange) so not sure if it will stay above.
$LW is below the 200sma but within 3%. However, the price is dropping (colored orange), so it will be falling further away.
$AMH is 9% above its 200sma and is the only stock whose price was rising (color.cyan) .

@whoof watches for when his stocks cross above the DEMA200.
So he would change this line in the script:
def trigger = average(close,200);
to:
def trigger = DEMA("length" = 200);

Feel free to cut & paste your favorite upper indicator into this watchlist.
Change the def trigger to whatever is the name of upper chart plot.
Hope This Helps.
 
Last edited:

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
390 Online
Create Post

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