Diabolicus

Exchange Comparison [Diabolicus]

This script helps you compare bitcoin prices across different currency pairs and exchanges. Quickly judge at a glance if "your" exhange currently trades above or below the rest of the market.
Each colored line represents an exchange pair of your choice. Exchange pairs must be entered normalized to USD, so for BTCEUR or XBTEUR multiply by EURUSD, for BTCCNY divide by USDCNH respectively.
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("Exchange Comparison [Diabolicus]", shorttitle="ExComp_Dia", overlay=true)

// 141113
// Exchange pairs must be normalized to USD, so multiply by EURUSD or divide by USDCNH respectively

pair1 = input(defval="BITFINEX:BTCUSD",title="Exchange Pair 1 Yellow")
pair2 = input(defval="BTCE:BTCUSD",title="Exchange Pair 2 Green")
pair3 = input(defval="BITSTAMP:BTCUSD",title="Exchange Pair 3 Orange")
pair4 = input(defval="KRAKEN:XBTEUR*EURUSD",title="Exchange Pair 4 Blue")
pair5 = input(defval="HUOBI:BTCCNY/USDCNH",title="Exchange Pair 5 Red")
pair6 = input(defval="OKCOIN:BTCCNY/USDCNH",title="Exchange Pair 6 Lime")

sym_hl2(s)=>security(s,period,hl2)
eurusd = sym_hl2("FX:EURUSD")
usdcnh = sym_hl2("FX:USDCNH")

base = ticker == "XBTEUR" ? 2 : ticker == "BTCEUR" ? 2 : ticker == "BTCCNY" ? 3 : 1

factor = base==2 ? 1/eurusd : base==3 ? usdcnh : 1

p1=plot(sym_hl2(pair1)*factor,color=yellow,linewidth=2)
p2=plot(sym_hl2(pair2)*factor,color=green,linewidth=2)
p3=plot(sym_hl2(pair3)*factor,color=orange,linewidth=2)
p4=plot(sym_hl2(pair4)*factor,color=blue,linewidth=2)
p5=plot(sym_hl2(pair5)*factor,color=red,linewidth=2)
p6=plot(sym_hl2(pair6)*factor,color=lime,linewidth=2)