Strategy for ema crossover and crossover should be within 5 previous candles

15 ema crossed 30 ema and crossover has taken place within previous 5 candles

For the above query you will get alerts once crossover happens on current close of candle

CROSSOVER(EMA(CLOSE,15),EMA(CLOSE,30))

Thanks sir,
ur coding will show only those crossovers which as taken place live or previous day.
But I want crossover should be within 5 previous candles and not older than 5 candles.
Suppose if crossover has taken place on 2nd day of any month , then if we scan on 5th day it should show the all the crossovers which has taken place between 1- 5 days