How to create a manual table of stocks

rengagopal

Member
VIP
Hello all,

I try to find the top 4 stocks in a list of (12 stocks) using thinkscript and create alert only for those 4 stocks. The sort criteria is current price / day open price and sort the list descending and pick the top 4 stocks and alert when a buy / sell condition occurs.

I don't know how to sort using thinkscript.

Thank you!!
 
Solution
Thank you!!

I have created a "Dashboard" kind of labels to show me what I want for now. But I am unable to align the columns due to the format of digits. I try to scalping / daytrading using 2 min chart. Please see the image and suggest how to keep the format, irrespective of the values in the same column to make a decision. I plan to use 12 stocks and pickup the top 3 to trade. using values in 3 columns (around 8 different data). Thank you!! and Thank you again!!
hal_leading

you need to make all the numbers have the same quantity of digits

this will add 2 digits for pennys, after the decimal point.
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Others/AsDollars

for dollars, will...
Hello all,

I try to find the top 4 stocks in a list of (12 stocks) using thinkscript and create alert only for those 4 stocks. The sort criteria is current price / day open price and sort the list descending and pick the top 4 stocks and alert when a buy / sell condition occurs.

I don't know how to sort using thinkscript.

Thank you!!
You can make a watchlist of the 12 stocks. Then use that watchlist in a scan, set to your rules, then use the alert option in scan
 

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

Thank you!! Any documentation on how to do it? Thank you!! I will also search.

You have not provided any specifics. So we can't answer in specifics.

If your question is how to create a custom table with your 12 stocks:

Create a manual watchlist for the equities
1. Go to MarketWatch tab​
2. Click on the lower hamburger menu icon
5jwxHMN.png
3. Click on Create Watchlist​
T2gZYZx.png
4. Create A Name For Your Watchlist​
5. Type in the symbols of the stocks​
6. Save Your Watchlist Table​
1HaS0NB.png
7. Click on the upper hamburger icon and detach watchlist​
 
Last edited:
First watchlist.... open side panel and create personal watchlist of your 12 stocks or double click symbol and add to watchlist.

In scan tab... create filters you want to use to clarify buying/selling signal.

Add the watchlist to scan in, by selecting watchlist from the button marked Scan in within the scan tab.

Create alert, once you have the items above done, you can save scan and then create alert, by hitting the button under the green scan button.
 
You have not provided any specifics. So we can't answer in specifics.

If your question is how to create a custom table with your 12 stocks:

Create a manual watchlist for the equities
1. Go to MarketWatch tab​
2. Click on the lower hamburger menu icon
5jwxHMN.png
3. Click on Create Watchlist​
T2gZYZx.png
4. Create A Name For Your Watchlist​
5. Type in the symbols of the stocks​
6. Save Your Watchlist Table​
1HaS0NB.png
7. Click on the upper hamburger icon and detach watchlist​
Thank you!!

I have created a "Dashboard" kind of labels to show me what I want for now. But I am unable to align the columns due to the format of digits. I try to scalping / daytrading using 2 min chart. Please see the image and suggest how to keep the format, irrespective of the values in the same column to make a decision. I plan to use 12 stocks and pickup the top 3 to trade. using values in 3 columns (around 8 different data). Thank you!! and Thank you again!!

 
It looks good to me.
Please pick one line from your table.
1. provide the script
2. show its current format
3. show how you want to see it.
Thank you !!

Please see the sample code for the first row for the symbol 'LLY' which is in the variable T01 and the heading.

ADDLABEL(YES, "SYMBL HIGH CLOSE VWAP TD_OPEN",COLOR.WHITE);

ADDLABEL(YES,T01 + " " ,COLOR.BLACK);
ADDLABEL(YES, ROUND(((PD_HIGH_T01 / ALL))*100,2),COLOR.PLUM); ADDLABEL(YES,IF VWAP_T01 > PD_HIGH_T01 THEN "^" ELSE "v",IF VWAP_T01 > PD_HIGH_T01 THEN COLOR.DARK_GREEN ELSE COLOR.RED);
ADDLABEL(YES," " + ROUND(((PD_CLOSE_T01 / ALL))*100,2),COLOR.DARK_GREEN); ADDLABEL(YES,IF VWAP_T01 > PD_CLOSE_T01 THEN "^" ELSE "v",IF VWAP_T01 > PD_CLOSE_T01 THEN COLOR.DARK_GREEN ELSE COLOR.RED);
ADDLABEL(YES," " + ROUND(((PD_VWAP_T01 / ALL))*100,2),COLOR.BLUE); ADDLABEL(YES,IF VWAP_T01 > PD_VWAP_T01 THEN "^" ELSE "v",IF VWAP_T01 > PD_VWAP_T01 THEN COLOR.DARK_GREEN ELSE COLOR.RED);
ADDLABEL(YES," " + ROUND(((TD_OPEN_T01 / ALL))*100,2),COLOR.YELLOW); ADDLABEL(YES,IF VWAP_T01 > TD_OPEN_T01 THEN "^" ELSE "v",IF VWAP_T01 > TD_OPEN_T01 THEN COLOR.DARK_GREEN ELSE COLOR.RED);

I want to display the values for example 'ROUND(((PD_HIGH_T01 / ALL))*100,2)' as format ###.## (means values can be in between 000.00 to 100.00). So the columns of each color for all the 6 stocks can be aliened properly to compare values between stocks to pick the top 3 stocks in each column.

Any other idea is also welcome to pickup the top 3 stocks. I have very limited knowledge in coding, but willing to try using some samples.

Thank you again!!!
 
Thank you!!

I have created a "Dashboard" kind of labels to show me what I want for now. But I am unable to align the columns due to the format of digits. I try to scalping / daytrading using 2 min chart. Please see the image and suggest how to keep the format, irrespective of the values in the same column to make a decision. I plan to use 12 stocks and pickup the top 3 to trade. using values in 3 columns (around 8 different data). Thank you!! and Thank you again!!
hal_leading

you need to make all the numbers have the same quantity of digits

this will add 2 digits for pennys, after the decimal point.
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Others/AsDollars

for dollars, will need to add spaces, so all numbers have about the same width as max number.

this post has formulas for adding leading characters. ( is number <10? or between 10 and 99?, or....)
https://usethinkscript.com/threads/...tion-from-addlabel-function.10456/#post-92584
 
Last edited:
Solution
you need to make all the numbers have the same quantity of digits

this with add 2 digits for pennys, after the decimal point.
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Others/AsDollars

for dollars, will need to add spaces, so all numbers have about the same width as max number.

this post has formulas for adding leading characters. ( is number <10? or between 10 and 99?, or....)
https://usethinkscript.com/threads/...tion-from-addlabel-function.10456/#post-92584
Thank you All!! It works.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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