noomnahor

altcoin index oscillator

Use
Compare alt coins to the "altcoin index", an average of a selection of alt coins.
Above zero means the coin you are viewing is worth more than the index, indicating the possibility of overbought.
Below zero indicating the opposite, a possibility of oversold.
Press the cog icon to select which alt coins you want included in the index.

Notes
The coins in the index are ALTBTC, meaning their value against BTC. Due to this the indicator is useless when viewing BTC only charts.
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?
//@version=2
//study("altcoin averages")
study("altcoin index oscillator", overlay=false)

curr = security(tickerid, period, ohlc4)

ch1 = input(true, "include ppcbtc", bool)
ch2 = input(false, "include ethbtc", bool)
ch3 = input(true, "include nmcbtc", bool)
ch4 = input(true, "include nxtbtc", bool)
ch5 = input(true, "include xmrbtc", bool)

count = ch1 + ch2 + ch3 + ch4 + ch5

ppc = iff(ch1, security("THEROCKTRADING:PPCBTC", period, ohlc4), 0)
eth = iff(ch2, security("KRAKEN:ETHXBT", period, ohlc4), 0)
nmc = iff(ch3, security("THEROCKTRADING:NMCBTC", period, ohlc4), 0)
nxt = iff(ch4, security("HITBTC:NXTBTC", period, ohlc4), 0)
xmr = iff(ch5, security("HITBTC:XMRBTC", period, ohlc4), 0)

average = avg(ppc, eth, nmc, nxt, xmr)
diff = (curr - average) / (average)
max = highest(diff, 21)
min = lowest(diff, 21)
highestAbs = abs(max) > abs(min) ? abs(max) : abs(min)
osc = diff / highestAbs

over = diff > 0
under = diff < 0

colordef = over ? red : under ? green : white

plot(osc, "osc", color=colordef, style=line)

plot(1, title = "Top Line", color = white, linewidth = 1)
plot(0, title = "Zero Line", color = yellow, linewidth = 1)
plot(-1, title = "Bottom Line", color = white, linewidth = 1)