Dilihat 848 kali
Simple Gold to Silver ratio indicator.
Skrip sumber terbuka

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Ingin menggunakan skrip ini pada carta?
study(title="GOLD/SILVER", shorttitle="GOLD/SILVER", overlay=false)

Sec1Input = input(defval="XAUUSD", title="First security", type=symbol, confirm=true)
Sec2Input = input(defval="XAGUSD", title="Second security", type=symbol, confirm=true)

sec(s) => security(s, period, close)
ratio = (sec(Sec1Input) / sec(Sec2Input))

plot(ratio, color=red, linewidth=3)