183 1 31
Btc             futures vs spot indicator

Made by thedudebtc
Remove from Favorite Scripts Add to Favorite Scripts
//Futures vs Spot

study(title = "FuturesVsSpot", shorttitle = "FuturesVsSpot")

ok3m = security("OKCOIN:BTCUSD3M",period, close)
ok2w = security("OKCOIN:BTCUSD2W",period, close)
ok1w =security("OKCOIN:BTCUSD1W",period, close)
stamp = security("BITSTAMP:BTCUSD",period,close)
usdcnh = security("FX_IDC:USDCNY",period,close)
btccny = security("OKCOIN:BTCCNY",period,close)
finex = security("BITFINEX:BTCUSD",period,close)

cny2usd = btccny/usdcnh

avg = (stamp+finex)/2
diff = ok1w-avg
diff2 = ok3m-avg
diff4 = ok2w-avg
diff3 = cny2usd-avg
col = diff<0 ? red : diff>0 ? green : gray
col2 = diff2<0 ? red : diff2>0 ? green : gray
plot(diff2, style=area,linewidth=1,color=aqua,transp=15)
plot(diff4, style=area,linewidth=1,color=yellow,transp=10)
plot(diff, style=area,linewidth=1,color=orange,transp=40)

plot(diff3, style=line, linewidth=2, color=white)
Awesome, added to favorite scripts
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
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