Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Futures & GBTC Vs Spot
- study(title = "Futures & GBTC Vs Spot", shorttitle = "Futures & GBTC Vs Spot")
- len=input(5, minval=1)
- ok3m = security("OKCOIN:BTCUSD3M",period, close)
- ok1w = security("OKCOIN:BTCUSD1W",period, close)
- coinbase = security("COINBASE:BTCUSD",period,close)
- stamp = security("BITSTAMP:BTCUSD", period, close)
- finex = security("BITFINEX:BTCUSD",period,close)
- kraken = security("KRAKEN:BTCUSD", period, close)
- gbtc = security("OTC:GBTC",period,close)
- avg = (coinbase+stamp+finex+kraken)/4
- diff = ok1w-avg
- diff2 = ok3m-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)
- plot(diff, style=area,linewidth=1,color=yellow,transp=25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement