A popular strategy used with momentum based trading systems is to close out an open position and initiate a reverse order upon a reverse signal. Typically, the reverse signal is the exit condition of the original trade.
XMIM has the ability to create multiple query blocks. You may create a compound query block by simply adding a new query block to your existing query.