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
@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
@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
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
 

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime

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
257 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.
Top