Before what?, chose your start candle, and check the 10 previous candles, rsi on candle x is > than what you saved into a variable.