[RS]Gold to Custom Currency V0

Request for: sankar2389
Gold             conversion from dollar to INR             and to grams.
Remove from Favorite Scripts Add to Favorite Scripts
study(title='[RS]Gold to Custom Currency V0', shorttitle='G', overlay=false)
grams_in_troy_ounces = 31.103
currency = input(title='Dollar Vs Currency desired to list gold:', type=string, defval='FX_IDC:USDINR', confirm=false)
gold_in_dollars = security('FX_IDC:XAUUSD', period, close)
dollars_in_currency = security(currency, period, close)
gold_oz_in_currency = gold_in_dollars * dollars_in_currency
gold_gm_in_currency = gold_oz_in_currency / grams_in_troy_ounces

plot(title='Oz', series=gold_oz_in_currency, color=black, transp=0, trackprice=true)
plot(title='Gm', series=gold_gm_in_currency, color=teal, transp=0, trackprice=true)
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out