There is allot of calculations that go in to the answer to your question, but the most simple rule to adhere to is this (please anyone correct me if I am wrong):
For every 3dB rating on your antenna you double the output of your wireless card. So if you have a 100mW card and a 16dBi antenna you should have an output of roughly 533.33mW.
In Mikrotik RouterOS, you set the regulatory domain (country), and the antenna gain.
That way, the software knows what the max power output is, and it knows the antenna gain. So it adjusts the power output, to play nice with others.