noomnahor

altcoin index oscillator

Purpose
This will give indication as to whether a specific altcoin is overbought or oversold, as determined by it's difference from the "altcoin index".
  • if the current security is above the index, the oscillator will show above zero.
    if the current security is below the index, the oscillator will show below zero.
Use
Add it as an indicator while looking at the chart you would like to assess. Click the settings button (cog) to select which coins you would like included in the index.
You can couple this tool with the "alctoin index overlay" indicator to view the correlation.
Notes
The "altcoin index" is the average BTC price of a selection of altcoins. Therefore this is their relation to bitcoin and not any national currency. Due to this, the indicator will be useless if you try to use it with BTCUSD etc.
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?
//@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)

over = diff > 0
under = diff < 0

colordef = over ? red : under ? green : white

plot(diff, "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)