ATR % Watchlist Column for ThinkorSwim

jngy2k

Member
It is a chart study that shows ATR% label of the past 20 days.

How do I make a column in watchlist ???

Code:
input length = 20;
input averageType = AverageType.Simple;
plot ATR = MovingAverage(averageType, TrueRange(high, close, low), length);
AddLabel (yes, "ATR: " + Round((ATR / close) * 100, 1) + "%", Color.WHITE);
 
Solution
Hi,

I changed the time to minutes and it's still not working. Thanks in advance for any advice you can provide.
iMW8C9M.png
My friend it is the time on the script i provided not the script of the study that you are trying to scan for

rad14733

Well-known member
VIP
You can display the value but not mixed with text, at least not that I am aware of... The code below should work for you...

Ruby:
input length = 20;
input averageType = AverageType.Simple;
plot ATR = Round(MovingAverage(averageType, TrueRange(high, close, low), length) * 100);
ATR.AssignValueColor(Color.BLACK);
AssignBackgroundColor(Color.WHITE);
 

FLTrader

New member
VIP
@rad14733 Thanks my guy. Looks real good. Works great for people that want to trade momentum stocks. Be well.

UVxnO8P.jpeg
@jngy2k I noticed you have a "TRADES" column on your screenshot...I tried to find it in ToS but it's not available, would you mind sharing the code so that i can add to my scanners? TY
Thx jngy2k but it doesn't seem to be working. I get back all zeros...i have a screenshot but for the life of me i dont know how to attach it.
 

FLTrader

New member
VIP
@jngy2k I noticed you have a "TRADES" column on your screenshot...I tried to find it in ToS but it's not available, would you mind sharing the code so that i can add to my scanners? TY

Thx jngy2k but it doesn't seem to be working. I get back all zeros


@jngy2k

this is the code and it still doesn't work..do you see anything wrong w/it? I appreciate the help.



def na=double.nan;
input orbegin = 0400;
input orend = 2000;
def oractive = if secondstilltime (orend)>0 AND
secondsTillTime (orbegin)<=0 then 1 else 0;
def today= getday()==getlastday();
rec tradescount = if today and tradescount[1]==0 then
tick_count() else if oractive and today then
tradescount[1]+tick_count() else tradescount[1];

plot scan = tradescount;
 

FLTrader

New member
VIP
Please see my screenshots. You'll see the stocks on my scanner all have zeros on the front end. Also attached is the a screenshot of the code.

Any help would be greatly appreciated.

TY

1-png.627
2-png.628
 

Similar threads

Top