CRISIS

(CRISIS) GOLD/SILVER Ratio

Simple Gold to Silver ratio indicator.
Open-source script

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.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study(title="GOLD/SILVER", shorttitle="GOLD/SILVER", overlay=false)

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

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

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