Need coding for my top reversal and bottom reversal

For top reversal-consecutive more than 5 green candle of 5mins and volume dropping…

for bottom reversal-vise versa

For the above condition you can check the strategy coded from below link