AFL Code to find Recent Red candle high /Green candle Low broken

Hi Traders,

I am new to this page and AFL too, i am writing some startergy which need to get the recent red candle high broken or Green Candle Low broken.

If there are more number of same color candles occurs continuously, it should take the last/recent candle into account.

Please help me guys…