50 SMA Bounce

I am trying to make a scan for stocks coming within ± 2% of 50 SMA.

LOWESTLOW(BARS=10, INCBAR=True) < (MA(BARS=50, CALC=Close))*1.02 and

LOWESTLOW(BARS=10, INCBAR=True) > (MA(BARS=50, CALC=Close))*0.98

Some of the scan results are outside of the ± 2% range.

How can it be improved?

Hi Brian,

You are comparing the current value of the MA50 to the lowest low over the last 10 days, so the current close may be outside the range. If you use CLOSE() instead of the LowestLow function does that do what you need?

You can also apply the Moving Average Bands tool to a chart to visualise the 2% tolerance window, and use your formula in a Show Bar to compare.