What you want can be done at the open of candle 4, ie the open price of the first candle AFTER this configuration is confirmed in the previous 3 candles. Would that fit your requirements?