CRISIS

(CRISIS) aggregateBTCvol v0.2.4

Aggregate multiple exchange volumes into single indicator

This update adds:
*Moving Average
*Add/change/disable to up 6 securities without touching code.
*Monochrome mode for dark themes.
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("aggregateBTCvol 0.2.3", precision=0, overlay=true)
study("aggregateBTCvol 0.2.4", precision=0)

//Input
mono    = input(false, title="Monochromatic volume?")
per = input (20, title="Moving average")

Vol1Input = input(defval="BTCE:BTCUSD", title="Security 1", type=symbol, confirm=true)
Vol1 = security(Vol1Input, period, volume)

Vol2Input = input(defval="BITSTAMP:BTCUSD", title="Security 2", type=symbol, confirm=true)
Vol2Value = security(Vol2Input, period, volume)
UseVol2 = input(true, title="Use Security 2?")
Vol2 = UseVol2 ?  Vol2Value : 0

Vol3Input = input(defval="BITFINEX:BTCUSD", title="Security 3", type=symbol, confirm=true)
Vol3Value = security(Vol3Input, period, volume)
UseVol3 = input(true, title="Use Security 3?")
Vol3 = UseVol3 ?  Vol3Value : 0

Vol4Input = input(defval="OKCOIN:BTCCNY", title="Security 4", type=symbol, confirm=true)
Vol4Value = security(Vol4Input, period, volume)
UseVol4 = input(true, title="Use Security 4?")
Vol4 = UseVol4 ?  Vol4Value : 0

Vol5Input = input(defval="OKCOIN:BTCUSD", title="Security 5", type=symbol, confirm=true)
Vol5Value = security(Vol5Input, period, volume)
UseVol5 = input(true, title="Use Security 5?")
Vol5 = UseVol5 ?  Vol5Value : 0

Vol6Input = input(defval="HUOBI:BTCCNY", title="Security 6", type=symbol, confirm=true)
Vol6Value = security(Vol6Input, period, volume)
UseVol6 = input(true, title="Use Security 6?")
Vol6 = UseVol6 ?  Vol6Value : 0


//IndMyVol = IndVol1+IndVol2+IndVol3


//Logic
src = Vol1+Vol2+Vol3+Vol4+Vol5+Vol6
ma = sma(src,per)
col = rising(ma,1)?aqua:falling(ma,1)?fuchsia:silver
cwheel  = close>=open?green:red

//Output

plot(src, color = mono?#CED8F6:cwheel, style=columns, title="Volume", transp=60, linewidth=3)

plot(ma, color=mono?silver:col, style=line, title="MA",transp=0,linewidth=2)