Recently i'm developing an indicator, and i need to get the barindex of the first time that indicator has triggered (it would trigger multiple of times, but i only need to get data of first time).
As shown in the picture, the indicator has triggered twice but i only need the barindex of first one and count how many times is has triggered.
Are there any buildin fuction to that (like barssince for counting bars) or any trick ?