Market Breadth Indicator (percentage of US stocks above * SMA) For ThinkOrSwim

MrBear

New member
Hello,

I was recently introduced to this indicator and was wondering if anyone had something similar to the one in Trading View by ICE MAN RAN. I did not see anything when I searched for it and I am still learning how to code my own thinkscripts

Market Breadth Indicator (percentage of US stocks above * SMA)
Market Breadth Study
 
Last edited by a moderator:

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

Thank you Mobius


Code:
# Percent of SPX Stocks Above 50, 100, 200 SMA
# Mobius
# V01

declare lower;

plot "50" = close("$SPXA50R");
     "50".SetDefaultColor(Color.Cyan);
plot "100" = close("$SPXA100R");
     "100".SetDefaultColor(Color.Orange);
plot "200" = close("$SPXA200R");
     "200".SetDefaultColor(Color.Green);
def min = Min("50", Min("100", "200"));
def max = Max("50", Max("100", "200"));
def mid = if("50" != min and "100" != min, "200",
          if("100" != min and "200" != min, "50",
          if("200" != min and "50" != min, "100", double.nan)));
addCloud(min, 0, color.red);
addCloud("50", "100", color.light_green, color.cyan);
addCloud("100", "200", color.pink, color.blue);
AddLabel(1, "Above 50: " + AsPercent("50"), "50".TakeValueColor());
AddLabel(1, "Above 100: " + AsPercent("100"), "100".TakeValueColor());
AddLabel(1, "Above 200: " + AsPercent("200"), "200".TakeValueColor());
# End Code
 
Thanks for posting this, MrBear. As an aside, I've been lobbying TDAmeritrade to provide the Percent of SPX stocks above their 10 and 20 day moving averages as well. If anyone else here wants those, please write to them requesting the additions. Does anyone know of a workaround to obtain the percent of SPX stocks above their 10 and/or 20-day moving averages on TOS?
 
Thanks for posting this, MrBear. As an aside, I've been lobbying TDAmeritrade to provide the Percent of SPX stocks above their 10 and 20 day moving averages as well. If anyone else here wants those, please write to them requesting the additions. Does anyone know of a workaround to obtain the percent of SPX stocks above their 10 and/or 20-day moving averages on TOS?

AGREED! want to have 5, 10 and 20 as well. I think 20 is the most important for trading.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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