The correct topic for questions about Conditional Orders is the Strategy Guide topic so I moved your question out of "Frequently Asked Questions" and into "Strategy Guide".
The built-in chart study named "HiLoActivator" is not suitable to be used in the Conditional Order tool. The first of my two screenshots below demonstrates why. The second screenshot shows the solution.
Here is a section of code which can be used in the Study Filter of a scan or directly within the Conditional Order or Study Alert tools on Thinkorswim:
input length = 3;
def maHigh = Average(high, length);
def maLow = Average(low, length);
def state = {default init, short, long};
if (close > maHigh) {
state = state.long;
} else if (close < maLow) {
state = state.short;
} else {
state = state[1];
}
def BuyStop = if state == state.short or state != state[1] then maHigh else Double.NaN;
def SellStop = if state == state.long or state != state[1] then maLow else Double.NaN;
def buySignal = !IsNaN(SellStop) and IsNaN(SellStop[1]);
def sellSignal = !IsNaN(BuyStop) and IsNaN(BuyStop[1]);
# use this to scan/trigger orders for buy signals
plot scan = buySignal[1];
# use this to scan/trigger orders for sell signals
#plot scan = sellSignal[1];
IMPORTANT NOTE: The solution above has been further modified so that it waits until the signal bar has full closed before it triggers. Why? Because until the signal bar is closed, the signal has not completed and is subject to change. This will prevent an order or alert from being triggered before its locked in.