scanning using bollinger bands and price relative

how can I scan for stocks that are on the low side of the Bollinger band or below it and not higher than the middle of the band?
How can I scan for stocks that are showing positive relative strength related to the benchmark? i.e. can i write something like the following line to achieve this? i tried a few things but nothing seems to be working. Thanks

and [today's price ($symbol:$SPX) > 5 days ago price ($symbol:$SPX)]

Answers