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:

halcyonguy

Well-known member
VIP
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;
 

Mutagenix

New member
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?
 

halcyonguy

Well-known member
VIP
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;

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
 
Last edited:

Mutagenix

New member
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.
 
Top