#### Howdy, Stranger!

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

# 50/200 DMA Close Proximity Scan

Hi there Guys.

I’m looking to create a scan that would target stocks in a Bollinger squeeze (< 6%) and would have both the 50 and 200 DMA in close proximity to current share price. I’m thinking within 4-6% of the SP. I currently have scans for the Bollinger squeeze however having trouble adding in the SMA’s. Any thoughts?

Thank you

Garth

• mod
edited September 2019
Pick some per cent that means "in close proximity" to you - e.g. one per cent, then test for close less than sma times 1.01 and close > sma times .99. This works because 1.00 = 100 percent (in other words, the sma), so .99 equals 1 per cent below and 1.01 equals 1 per cent above the sma. So, you will get a hit for any price less than the sma PLUS 1 per cent (sma * 1.01) AND greater than the sma MINUS 1 per cent (sma * .99). You have to do this for both smas. You might have to play around with the one per cent - maybe 5? 10? You don't know until you see the results. Also try back dated scans - maybe December when falling prices would have brought the 50 nearer the 200 for most stocks.
• Awesome thank you very much!
• Hi Markd,

This is what I came up with but it contains syntax errors I cannot correct. Are you able to point me in the right direction?

Thank you kindly!

[type = stock]