CGS

FuturesVsSpot

137 1 15
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
 
hline(0,title="0")
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)
Fanatik_
11 months ago
Awesome, added to favorite scripts
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out