CRISIS

(CRISIS) aggregateBTCvol v0.2.4

118 0 9
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.
Remove from Favorite Scripts Add to Favorite Scripts
//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)
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out