Small candles 5 min

Sir Is there any way to know that the candle 5 min is small candle. I.e the difference in high and low of candle is the lowest of last 10 candles including previous days candles. I.e even with first candle of the day if small compared to previous day then get a signal.

for the above given condition you can check below strategy from expert advisor