Last active
December 12, 2018 22:37
-
-
Save jpmx/877a9abc22532df6b43d0791db8034c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@version=3 | |
// INDICATOR PARAMETERS | |
sTitle = "KRW Volume" | |
sShort = "KRW Volume" | |
sRelease = "2018-03-30" | |
sOverlay = false | |
sScale = scale.right | |
sPrecision = 0 | |
study(title=sTitle+" [v"+sRelease+"]", shorttitle=sShort, overlay=sOverlay, scale=sScale, precision=sPrecision) | |
// _______________________ | |
// ________ INPUTS _______ | |
sym01Title = "Total Volume (USD)" | |
sym02Ticker = "BITFINEX:BTCUSD" | |
sym03Ticker = "COINBASE:BTCUSD" | |
sym04Ticker = "BITSTAMP:BTCUSD" | |
sym05Title = "Bithump (KRW)" , sym05Ticker = "BITHUMB:BTCKRW" | |
// OPTIONS | |
// User selection of which exchanges to compute (default: all) | |
sym05 = input(title=sym05Title, type=bool, defval=true) | |
// VOLUME | |
sym01Volume = nz( security(sym05Ticker, period, volume) ) | |
sym02Volume = nz( security(sym05Ticker, period, volume) ) | |
sym03Volume = nz( security(sym05Ticker, period, volume) ) | |
sym05Volume = sym05 ? nz( security(sym05Ticker, period, volume) ) : 0 | |
// Stacked values (graphical purposes only, these values are meaningless) | |
USDGraph = sym01Volume + sym02Volume + sym03Volume | |
KRWGraph = sym05Volume | |
// ________ DRAW _________ | |
green20 = #A5D6A7, green40 = #66BB6A, green60 = #43A047, green80 = #2E7D32, greenA4 = #00E676, greenA7 = #00C853 | |
red = #ff2121 | |
plot(series=USDGraph, title=sym01Title, style=columns, transp=100, color=green60 ) // USD hidden - for scale only | |
plot(series=KRWGraph, title=sym05Title, style=columns, transp=0, color=red ) // KRW |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment