The only block that can iterate through candles and check something is "Indicator moves within limits". This block can check if for X candles the price was > MA and even allow few exceptions, but you can't specify where which candles can be the exceptions. You can detect if within 10 candles, for 3 of them the price was > than MA, but these candles could be #2, #5 and #7 or any other. Only because of that I think this block is not enough. This job is for some indicator that does exactly this or has tons of settings
B