#### Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

# Scan on Monthly for stocks that haven't closed below lower BB for the last 5 years.

Hi there,

I'm trying to write a scan on the monthly period that only captures stocks that have never closed below the Lower Bollinger band during the last 5 or 10 years.

I've been working on it and tried this:

and [1 month ago min(60,(close)) > (Lower BB(20,2))]

But its coming up with an error. Anyone know what i'm doing wrong here?

Thanks!

• ✭✭
close doesn't belong in parenthesis.

and [1 month ago min(60,monthly Close) > [Lower BB(20,2) ]]
• Thanks! I'm not sure if maybe i'm thinking this wrong. I was trying to capture this:

Essentially, at no time does the price hit the lower BB over the past 5 years in this chart.
• mod
edited May 2021
I don't think there is a way to do that without comparing each month's low to each month's Lower BB value

and [1 month ago monthly low > 1 month ago monthly Lower BB(20,2)]
and [2 months ago monthly low > 2 months ago monthly Lower BB(20,2)]
and [ etc. ...

But you might try something with Fast Stochastics, which measures where the close is in relation to the range for a chosen period (you can see the range if add Price Channels to your chart for the time period you are interested in, e.g. 12 months). A stock like the one above would probably stay above some level (like maybe 75 - just a guess) for the entire time.

Maybe something like -

and [monthly max(60, monthly Fast Stoch %K(12,1)) > 75]

So that says, for the last five years (60 months), Fast K (the close over a one year range) has never been below 75 (or, same thing, has always been above 75 - in other words, has always closed in the top quarter of its 12 month range).

You could adjust the 12 (one year) and the 75. But don't adjust the "1" in (12,1).

This might capture cases where a spike down crossed the Lower BB and then closed up, but that should be rare.
• Yeah i've inputted it out manually before, i guess that wouldn't be an issue since its in months. Thanks!