Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Pine Script - Volume Inago
//@version=4
study("volumes inago")
isCoinbase = input(true, "coinbase:BTCUSD")
isKraken = input(true,"kraken:BTCUSD")
isGemini = input(true,"gemini:BTCUSD")
isBittrex = input(true,"bittrex:BTCUSD")
isBitstamp = input(true,"bitstamp:BTCUSD")
isBybit = input(true,"bybit:BTCUSD")
isBybitUSDT = input(true,"bybit:BTCUSDT")
isBinance = input(true,"binance:BTCUSD")
isBinanceUSDT = input(true,"binance:BTCUSDT")
isOkexUSDT = input(true,"okex:BTCUSDT")
isHuobiUSDT = input(true,"huobi:BTCUSDT")
isFtxUSDT = input(true, "ftx:BTCUSDT")
isPoloniexUSDT = input(true, "poloniex:BTCUSDT")
colorCoinbase = input(#ff1493,"coinbase:BTCUSD")
colorKraken = input(#0000cc,"kraken:BTCUSD")
colorGemini = input(#666666,"gemini:BTCUSD")
colorBittrex = input(#ffffe0,"bittrex:BTCUSD")
colorBitstamp = input(#006400,"bitstamp:BTCUSD")
colorBybit = input(#ff4500,"bybit:BTCUSD")
colorBybitUSDT = input(#00ff00,"bybit:BTCUSDT")
colorBinance = input(#bcb665,"binance:BTCUSD")
colorBinanceUSDT= input(#deb887,"binance:BTCUSDT")
colorOkexUSDT = input(#ffff00,"okex:BTCUSDT")
colorHuobiUSDT = input(#003399,"huobi:BTCUSDT")
colorFtxUSDT = input(#0099cc,"ftx:BTCUSDT")
colorPoloniexUSDT = input(#ff0000,"poloniex:BTCUSDT")
//For Convert
bybitClose = security("BYBIT:BTCUSD",timeframe.period, close)
ftxUSDTClose = security("FTX:BTCUSDT",timeframe.period, close)
coinbase = isCoinbase == true ? security("COINBASE:BTCUSD",timeframe.period,volume) : 0
kraken = isKraken == true ? security("KRAKEN:XBTUSD",timeframe.period,volume) : 0
gemini = isGemini == true ? security("GEMINI:BTCUSD",timeframe.period,volume) : 0
bittrex = isBittrex == true ? security("BITTREX:BTCUSD",timeframe.period,volume) : 0
bitstamp = isBitstamp == true ? security("BITSTAMP:BTCUSD",timeframe.period,volume) : 0
bybit = isBybit == true ? security("BYBIT:BTCUSD",timeframe.period,volume) / bybitClose : 0
bybitUSDT = isBybitUSDT == true ? security("BYBIT:BTCUSDT",timeframe.period,volume) : 0
binance = isBinance == true ? security("BINANCE:BTCUSDT",timeframe.period,volume) : 0
binanceUSDT= isBinanceUSDT == true ? security("BINANCE:BTCUSDTPERP",timeframe.period,volume) : 0
okexUSDT = isOkexUSDT == true ? security("OKEX:BTCUSDT",timeframe.period,volume) : 0
huobiUSDT = isHuobiUSDT == true ? security("HUOBI:BTCUSDT",timeframe.period,volume) : 0
ftxUSDT = isFtxUSDT == true ? security("FTX:BTCUSDT",timeframe.period,volume) / ftxUSDTClose : 0
poloniexUSDT= isPoloniexUSDT == true ? security("POLONIEX:BTCUSDT",timeframe.period,volume) : 0
hline(0, color=color.white, title="base")
total = coinbase + kraken + gemini + bittrex + bitstamp + bybit + bybitUSDT + binance + binanceUSDT + okexUSDT + huobiUSDT + ftxUSDT + poloniexUSDT
plot(total, color=colorCoinbase, title="COINBASE:BTCUSD", style=plot.style_columns)
total := total - coinbase
plot(total, color=colorKraken, title="KRAKEN:BTCUSD", style=plot.style_columns)
total := total - kraken
plot(total, color=colorGemini, title="GEMINI:BTCUSD", style=plot.style_columns)
total := total - gemini
plot(total, color=colorBittrex, title="BITTREX:BTCUSD", style=plot.style_columns)
total := total - bittrex
plot(total, color=colorBitstamp, title="BITSTAMP:BTCUSD", style=plot.style_columns)
total := total - bybit
plot(total, color=colorBybit, title="BYBIT:BTCUSD", style=plot.style_columns)
total := total - bybitUSDT
plot(total, color=colorBybitUSDT, title="BYBIT:BTCUSDT", style=plot.style_columns)
total := total - binance
plot(total, color=colorBinance, title="BINANCE:BTCUSD", style=plot.style_columns)
total := total - binanceUSDT
plot(total, color=colorBinanceUSDT, title="BINANCE:BTCUSDTPERP", style=plot.style_columns)
total := total - okexUSDT
plot(total, color=colorOkexUSDT, title="OKEX:BTCUSDT", style=plot.style_columns)
total := total - huobiUSDT
plot(total, color=colorHuobiUSDT, title="HUOBI:BTCUSDT", style=plot.style_columns)
total := total - ftxUSDT
plot(total, color=colorFtxUSDT, title="FTX:BTCUSDT", style=plot.style_columns)
total := total - poloniexUSDT
plot(total, color=colorPoloniexUSDT, title="POLONIEX:BTCUSDT", style=plot.style_columns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment