Praise be to Allah.
It is not permissible to trade in this manner, because the sale of gold and silver is subject to the condition that the exchange be made on the spot, in the same sitting as that in which the transaction is agreed upon. And the condition of a sale being valid is that it should be definitive and not subject to any fluctuation.
If a person buys five grams of gold for fifty dollars, he must take possession of the gold immediately and it is not permissible for him to delay taking possession of it until a year or month or day has passed.
In cases where it is not stipulated that possession be taken of the sold item immediately, the transaction must be clear and there should be no fluctuation or ambiguity concerning it. Sharee‘ah permits the salam transaction in which a person buys something that of known description, such as paying fifty dollars today on the basis that he will take 100 kg of rice in six months time. But it is not permissible for this transaction to be uncertain, according to the market price, such that the purchaser may get 100 kg or he may get 200 kg. Rather he is not entitled to anything other than what has been agreed upon, which is 100 kg, no matter what changes there are in the price, because the Prophet (blessings and peace of Allah be upon him) said: “Whoever pays in advance for something, then (it should be) for a specified measure and a specified weight, (to be handed over) at a specified time.”
Narrated by al-Bukhaari (2241), Muslim (1604).
Payment in advance here is a salam transaction, but this kind of transaction (salam transaction) is not valid when it comes to selling gold, silver and currency, because the permissibility of trading in these things is subject to the condition that the exchange take place on the spot, and it is not permissible to sell them for deferred payment or payment by instalments.
And Allah knows best.