How to add plot scan function to custom watchlist column?

Mutagenix

New member
I'm trying to get this code to only return results of <1% or >1% while still displaying the plot itself.

plot x = Round(100 * ((close / open) - 1), 1);

x.AssignValueColor( if x < 0 then Color.ORANGE else Color.CYAN);

Thanks!
 
Last edited:
I'm trying to get this code to only return results of <1% or >1% while still displaying the plot itself.

plot x = Round(100 * ((close / open) - 1), 1);

x.AssignValueColor( if x < 0 then Color.ORANGE else Color.CYAN);

Thanks!

for a column study.
i'll assume x is a valid %.
by show plot, i assume you want the close price to be displayed.

Code:
input limit = 1;
def x = Round(100 * ((close / open) - 1), 1);
plot z = if ( x > limit or x < -limit ) then close else 0;
 
for a column study.
i'll assume x is a valid %.
by show plot, i assume you want the close price to be displayed.

Code:
input limit = 1;
def x = Round(100 * ((close / open) - 1), 1);
plot z = if ( x > limit or x < -limit ) then close else 0;
This is great but how do I omit results that don't meet the input limit criteria?

I'm looking at a bunch of erroneous 0's on my watchlist.

I only want to see results that meet the limit. Any suggestions?
 
This is great but how do I omit results that don't meet the input limit criteria?

I'm looking at a bunch of erroneous 0's on my watchlist.

I only want to see results that meet the limit. Any suggestions?

try altering the code to this ( close to 1)

Code:
input limit = 1;
def x = Round(100 * ((close / open) - 1), 1);
plot z = if ( x > limit or x < -limit ) then 1 else 0;
EDIT

put the code in a scan code window
save the scan
go to a watchlist and choose the scan name to supply data


not this
send the scan output to a watchlist.


use the scan results to fill a watchlist.
Watch "Use ThinkOrSwim to SCAN for Stocks Based on The Strat" on YouTube
james fox
9:30 he talks about saving the scan as a watchlist
 
Last edited:
try altering the code to this ( close to 1)

Code:
input limit = 1;
def x = Round(100 * ((close / open) - 1), 1);
plot z = if ( x > limit or x < -limit ) then 1 else 0;

then put the code in a scan.
send the scan output to a watchlist.


use the scan results to fill a watchlist.
Watch "Use ThinkOrSwim to SCAN for Stocks Based on The Strat" on YouTube
james fox
9:30 he talks about saving the scan as a watchlist
The perfect workaround doesn't exi....

I've been fighting this on my own for over a month, your solution is immaculate.

If you figure out how to force TOS to scan in real time let me know :ROFLMAO:

That was a joke btw, I've accepted the impossibility of that request.

Thank you sir.
 
The perfect workaround doesn't exi....

I've been fighting this on my own for over a month, your solution is immaculate.

If you figure out how to force TOS to scan in real time let me know :ROFLMAO:

That was a joke btw, I've accepted the impossibility of that request.

Thank you sir.

yes you can.
i mispoke and may have confused you.
create a scan.
save it.
in a watchlist , you choose the saved scan name to supply data to a watchlist, automatically. it may take a couple minutes for it to update
here is another link

https://youtu.be/QCc5vJzd06E

scanner
stock hacker
create some rules for a scan
( ref: 5:45 - save scan )
top right, menu icon (middle one)
( to the right of 'add condition group' )
save scan query
give it a name, save it.

watchlist
click on the list name in the header
.. drop down menu
..personal
look for the scan name. it will have a purple circle next to it.
 
Last edited:

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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