Scanning for Squeezes via Watchlists
Please use the full screen option in the bottom right hand corner of the video for the best viewing experience.
Copy and paste the code found below.
def atr = AvgTrueRange(high, close, low, 20);
def stddev = stdev(close, 20);
def average = average(close, 20);
def UpperBand1 = ROUND(average + 1.5 * atr,2);
def UpperBand2 = ROUND(average + 2 * stddev,2);
plot data = if(UpperBand1 - UpperBand2) > 0 then 1 else 0;
data.AssignValueColor(if data > 0 then color.RED else color.GRAY);
Most Helpful Customer Articles
Henry, when I set up the code and click OK they all read "loading" for about 5 minutes. Yours calculated right away. Any tips for settings so these will calc faster?
First time I've seen a demo of how to add code to TOS. Very clear. Thanks!
Was just thinking about doing something like this yesterday.