All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
It is impermissible to sell gold for dollars on credit even if they are different types because each one of them is used as a price for other commodities. Scholars say that if the types were different and both items were used for the same purpose, the amount may not be the same, but the sale should be on cash and the sold item should be taken at the time of concluding the contract. The proof of this is the Hadeeth (narration) that was narrated on the authority of ‘Ubaadah ibn As-Saamit that the Prophet, sallallaahu ‘alayhi wa sallam, said: "Gold is to be paid for by gold, silver by silver, wheat by wheat, barley by barley, dates by dates, and salt by salt, like for like and equal for equal, payment being made hand to hand." [Muslim and Ahmad]
Allaah knows best.