You can control the set of ports that mIRC uses for a server by specifying them in that server's entry in the servers list.
If "irc.mirc.com" is not in my servers list and I try /server irc.mirc.com 1234, the connection fails with "Unable to resolve server", and the next attempt continues to use the same port.
If I add the server "irc.mirc.com" to my servers list with ports 1,2,3,4,5, and then try to connect to it, mIRC will always rotate between those ports.