How can I "invalidate" an already used Ichimoku Cloud situation?

 

I tried to make an EA based on Ichimoku Clouds and soon ran into a silly mistake.

When all the conditions are met, the EA opens a trade. For example, long. If you're familiar with Ichimoku Clouds, you know what those conditions are.

So the trade hits take profit and closes the trade. And guess what, it immediately opens another one because all the "if this is above that" conditions are still met.

My first idea to fix it was not very good. I considered creating a sort of mandatory alternate rule: if the last trade was long, the next one can only be short, and vice-versa. But that doesn't match reality.

So what approach can you recommend for me to tell the EA that a "spent" Ichimoku Cloud situation must not be used again and to wait for a completely new one?