ATR custom watch list


Category:
0
0

Hello Hahn,

I was wondering if you could help with the following custom column watch list:

  • ATR > 0.2-0.39 yellow backgrounds (with black numbers)
  • ATR>  0.40 red background
  • everything else black background (below 0.2)

Thanks,

 

j

Would you please copy/paste the entire code right here as I don’t know anything about coding?

I will continue to gives donations for the help.

RESOLVED
Marked as spam
Posted by (Questions: 22, Answers: 63)
Asked on March 15, 2018 8:45 am
1325 views
0

Before building this. I wanted to make sure you are aware that the ATR is a measure of the range (from high to low) of bars on the chart. A stock with a an average price of $10 a share is going to have a completely different value then a stock of $100 a share. The request you have made here would create a script that will only be valid for a list of stocks that are exactly the same price.

( at March 15, 2018 9:12 am)
0

I know, I would like to track the ATR similar to how it currently functions by default in TOS with these values

length= 2
avertage type= wilders

( at March 15, 2018 10:33 am)
0
Or even better since I will be using this on 1 minute charts lets make the parameters ATR > 0.04-0.10 yellow backgrounds (with black numbers) ATR> 0.10 red background everything else black background (below 0.04)
( at March 15, 2018 10:45 am)
0
Private answer

Ok, try this. I just copied the code from Thinkorswim and added the final line to assign the background color of the watchlist. You will want to adjust your input for length as I left that as the default value.

input length = 14;
input averageType = AverageType.WILDERS;
plot ATR = MovingAverage(averageType, TrueRange(high, close, low), length);
AssignBackGroundColor(if ATR > 0.1 then Color.RED else if ATR > 0.04 then Color.YELLOW else Color.BLACK);

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on March 15, 2018 11:19 am