I have that problem always: In the first attempt the automatic validation shows: no trading operations. I have to compile the same file 3 - 5 times until the automatic validation has operations.
But now even 10 times trying it doesn't help. I renamed files that are already in the market and tried it: no trading operations.
So I hope mql5 'repairs' their automatic validation system soon, as I would like to give my clients an update.
Problem solved for now - after 20 attempts the automatic validation finally had trading operations.
But it can't be like that always, the automatic validation must be repaired.
Did you try waiting for ~5 minutes? I observed that there is a problem in unloading the frame context from the tester agent, this takes several minutes until it states 'stopped' in its log (see Local Agents Logs). Before that point it won't accept new tasks.
IS 3 15:14:33.660 Network additional connect from 127.0.0.1
EH 3 15:14:33.760 Network previous connect context not freed
QN 2 15:14:33.760 127.0.0.1 cannot accept connect, agent is busy
CO 0 15:14:45.093 127.0.0.1 prepare for shutdown
JI 0 15:20:12.997 Server MetaTester 5 stopped
I posted sort of a fix here that's working well for me: https://www.mql5.com/en/forum/305738#comment_10904894
You need to add this snippet to your OnTick. I did 200K test runs this weekend without any problems.