Can anyone help to create and indicator for this?

 

Hi,

I wish to create an indicator that displays an indication when there are 2,3,4 or 5 consecutive candles with higher highs and higher closes or lower lows and lower closes. I want to be able to select whether I have the indicator set to 2, 3, 4 or 5 consecutive candles.

Thanks alot

 

I have now found the answer to this.

Reason: