Candle stick search

  1. I want to scan for stocks which are taking support and forming base at or near major moving averages (eg 200 SMA 50 SMA). How to code that?

  2. how can we search for candle stick formation near a support zone, like formation of hammer or shooting star near 10 EMA?

As per your condition

CROSSOVER(SMA(CLOSE,200),SMA(CLOSE,50))

we can not define near EMA to the hammerÂ