Currency values

Currency values


hello guys,
i need a little help with a problem i have right now,
how can i set a currency value to another currency at my website,
lets say i have a website in which i offer products, but these products i bought in yens(Chinese currency) and im selling for it for dollars and i would like to get the most profit possible,
and the yen price to the dollar price keeps changing, is there’s a way to link the two prices together so that every time the prices change so will the product price will too with out adding any widegts from other places cuz i simply don’t trust those kind of services and they charge money
i need to do that by myself
any help on that would be appreciated, and thanks