High & Low Indicator?

 

Hi.

Could someone please tell me if is it possible to do the following? I've got an indicator that automatically plots high & lows on my charts. It marks all high's that have two lower high's (at least) to the left and two to the right with a red dot. This I am happy with. I now want the indicator to count the bars between the high's & lows. Let's say I want a high to have two lower high's (at least) on both sides to qualify as a high and the same with the lows. But now I want there to be two bars (at least) between any high & the next low and also between any low and the next high. In other words high's & lows should always be seperated by two bars. Is this possible?

Reason: