Are you using trigger count or repeat count? I think that may be relevant here. Try trigger if you're not already using it. But for more help, we'll need more detail. Can you post a screenshot of the expanded sexp?
I am using trigger count set to 99, and here's my current setup. I have had previous setups, but the problem with those setups is that they either only worked once, only worked once and sent 99 messages every time, and only worked once, sent 99 messages every time, and took 3 SEXPs and 2 variables per ship.
My current setup simply unprotects everything and doesn't work, but gets it condensed into one SEXP, which is not really that important.

(Oh, yeah, and the thing in the not is-destroyed-delay box which I forgot to expand was <argument>.)
From what I see here, your SEXP is fairly straightfoward. When ai-order is X, do Y, Z, ETC. The protecting, resetting of orders, sending messages, and unprotecting are all pretty easy. For repeating, you need to simply give it a trigger count higher than 1.
Unfortunately, there's no good way to check when a ship receives specific orders. (I'm assuming this is your problem) What order are you checking for? How is the order given? If the order is give in other sexps, you can set a bit-variable and use that to trigger this sexp. If you are checking for other types of orders, like player orders.. things get much more hairy. The best you can do is check for the symptoms of that ai-order.
Actually, my problem is getting it to repeat every time it has a certain order, stopping it from firing 99 times once it has gotten the order, allowing it to fire again, and not sending the message 99 times.
And the setup is that the player needs to give the order which is to attack a certain ship, thus fulfilling the query-orders, and unprotecting that ship so that everything only shoots at that.
Edit: And yes, there is a SEXP that resets the orders of the ship that must be ordered to attack the other ships whenever it gets an ai-chase order, which is the only order it can receive.