Sure it is triggered with the bar but also with the tick. My problem currently is that my code (for reasons beyhond my current understanding) give erratic behavior. When I load the indicator, it is properly calculated on historical data. When tick occured, it has trouble to always identify a previous high or previous low. It work better if I use a shift = 1 as every tick will launch a calculation based on previous bars only. But still there are a few errors that never occur when the process is launch on historical datas. So the idea it to always do the calculation on the past 2/3 bars.
I'll check the code ASAP and let you know. If everything's fine, I'll post the indicator.