If you profit on a stock sale you are forced to pay US dollars as tax.
Canadian dollars in my case, but ok.
If you profit on a gold bar sale you are forced to pay US dollars as tax.
You can only be forced to do so if there is a record of the transaction taking place. You may be legally obligated to pay taxes after selling some gold to your buddy, but that doesn't necessarily mean the law is enforceable in that situation.