Count Candles

 

Hi all,

Would anyone know of/have an indicator that counts and displays the number of candles since a candle hit/left a moving average? For example it would start counting candles as soon as a candle has moved, say 30 or 50 pips (or any similar small figure) from a moving average (that could be defined) and would keep counting until a candle came back and hit inside that 30/50 pip mark again.

I am a mt4 coding novice, but if someone could even point me in the direction of similar sample code i could attempt edit that would be great

Thanks,

Toriacht

Reason: