XBT Price Delta
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © bitbox

//@version=4
study("XBT Price Delta")

cb = security('COINBASE:BTCUSD', '1', close)
bybit = security('BYBIT:BTCUSD', '1', close)
diff = ((bybit - cb)/cb) * 1000

plot(series=diff, style=plot.style_columns, color = diff >= 0 ? color.red : color.green)