How do I convert this ATR% chart study into a scanner watchlist column?

jngy2k

jngy2k

Member
VIP
It is a chart study that shows ATR% label of the past 20 days.
How do I make a column in watchlist ???

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);
 
rad14733

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);
 
jngy2k

jngy2k

Member
VIP
@rad14733
thanks my guy
looks real good
works great for people that want to trade momentum stocks
be well
 

Similar threads

Top