Detecting wide bar sizes high and low

 

Hi,

I have a question regarding the programming into an indicator of the spread of the candlestick. Specifically the high and low of that bar.

What I want is a way for the indicator to be able to detect what is a wide spread bar vs average spread bar vs low spread bar.

The problem of calculating the average spread is that during a volatile period the average spread is high and in non volatile period the average spread is lower. So a bar which could be termed as a wide spread bar in non volatile times could become a average or even narrow spread bar in volatile times.

Any suggestions that can be applied to programming of an indicator?

Thanks,

- forexmm