Is it possible to create code for scanner?

I found below trading strategy very usefull in daily trading. However it is not supported in scanner.

Can you please code it for scanner?

hElLO tRaDeR,

BUY SCRIPT:

REF(CLOSE, 1) < REF(BBB(CLOSE, 20, 2, EXPONENTIAL), 1) AND 
CLOSE > BBB(CLOSE, 20, 2, EXPONENTIAL) 

SELL SCRIPT:

REF(CLOSE, 1) > REF(BBT(CLOSE, 20, 2, EXPONENTIAL), 1) AND 
CLOSE < BBT(CLOSE, 20, 2, EXPONENTIAL)