The Condition Wizard does not support looping structures. If you wanted to build this sort of scan using the condition wizard you would need to add four separate conditions. The screenshot below shows how to build it using the condition wizard. The result is the following line of code:
close from 3 bars ago is greater than close from 4 bars ago and close from 2 bars ago is greater than close from 3 bars ago and close from 1 bars ago is greater than close from 2 bars ago and close is less than close from 1 bars ago
But I find it much easier to just write it out in the following way:
input consecutiveBars = 3;
def higherCloses = Sum(close > close[1], consecutiveBars) >= consecutiveBars;
plot scan = higherCloses[1] and close < close[1];
Notice the second solution is much easier to read and it also includes a user input so you can adjust the number of consecutive higher closes required in the pattern. And it does not include any looping structures.
FYI, looping structures are very rarely required in any solution for Thinkorswim. Which is a good thing, because the looping structure provided by Thinkorswim is utterly miserable to use.