i want to calculate sum high and lows just after latest(most recent) price crossing sma 50 but i don't know how to get that index of candle that price cross MA in most recent cross thanks