Relative Strength RP Labels For ThinkOrSwim

@boatshoes
I didn't create the logic for this study (my specialty is putting the lipstick on the pig) :)
If you look at the first post in this thread, you will find how the movement is defined.
According to this study, technology has been down down down for quite a while now... And look there is staples slowly rising...
aaa2.png
Perhaps a floating bubble, then clik on to visit chart
 

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

i am still encountering movement from Nick's scripts/indicators, unquestionable scan results. With more live market data, hope has stood aside.
 
Last edited:
Here's a scan for hunting for either Bullish or Bearish relative performance (strength).

# Written by Nick 03/03/22

#Change the Input parameters to your liking and in the Plot section, either hash (#) or
# unhash the plot that you want to scan for, either Bull or Bear.

#Inputs
input ComparionSymbol = "SPY";
input AvgType = AverageType.SIMPLE;
input Price = FundamentalType.CLOSE;
input STMALength = 5;
input LTMALength = 21;

#Definitions
def SymbolPrc = Fundamental(Price);
def ComparisonPrc = Fundamental(Price, ComparionSymbol);
def STMA = MovingAverage(AvgType, SymbolPrc / ComparisonPrc, STMALength);
def LTMA = MovingAverage(AvgType, SymbolPrc / ComparisonPrc, LTMALength);
def MABull = STMA > LTMA;
def MABear = STMA <= LTMA;

#Plots for Scans
plot BullRP = if MABull then 1 else 0;
#plot BearRP = if MABear then 1 else 0;
Nick, I appreciate your code. I used one for the BearRP and deleted the line with the Bull RP but nothing shows up. I included in my scan that the Condition result has to be less than. I also tried the script leaving only the Bull in with a greater than. I then changed to a shower MA period to see if anything comes up...similar results. Did I made a mistake? Thanks
 
Nick, I appreciate your code. I used one for the BearRP and deleted the line with the Bull RP but nothing shows up. I included in my scan that the Condition result has to be less than. I also tried the script leaving only the Bull in with a greater than. I then changed to a shower MA period to see if anything comes up...similar results. Did I made a mistake? Thanks
Tech Guy, I don't think that what you did should have affected the scan results.
Using the Daily aggregation period and the SP500 watchlist, I used the scan in this post and # out the BearRP and I received 265 results. Then, I changed the BearRP to only < and # out the BullRP and it returned 235 results. So, the scan works because total results were 500.
Thanks for your appreciation and good luck.
 
Tech Guy, I don't think that what you did should have affected the scan results.
Using the Daily aggregation period and the SP500 watchlist, I used the scan in this post and # out the BearRP and I received 265 results. Then, I changed the BearRP to only < and # out the BullRP and it returned 235 results. So, the scan works because total results were 500.
Thanks for your appreciation and good luck.
Thanks Nick. I just had to use "Value" in the criteria with the "Aggregation" rather than an greater than, less than, etc. I added this script to a few other "filters" to get something more like I was looking for. But, I may change these criteria based on results I get over the next week.
 
I love this and have been using it for my own swing trading but the script is not pulling the correct sector for me in some cases
 
When picking the comparison symbol, sometimes you have to wait for ToS to display the choices. When this occurs, enter the symbol and press enter twice. Hope this helps.
 
I use a white background. The text is white, a little hard to read on my charts. Is it possible to change the text to black?
 
Color is the third variable of the AddLabel built-in function. However, I think that controls the color of the label, not the text within the box. I don't know how to change the text color. Try a black background?
Merry Day, can you help?
 
I use a white background. The text is white, a little hard to read on my charts. Is it possible to change the text to black?
Color is the third variable of the AddLabel built-in function. However, I think that controls the color of the label, not the text within the box. I don't know how to change the text color. Try a black background?
Merry Day, can you help?

In the ToS app, the text color of labels on a chart is always determined by the background color of the chart.

If the background is black, the text color will be black, if the background is purple, the text color is purple.

Sadly no.
ToS does not provide the ability to customize the text color of labels on a chart .
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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