Altcoin Dominance (without ETH) Excluding Stablecoins Unsymetric
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Unsymetric

//@version=5
indicator("Alt.D w/o ETH - Stable", overlay=true) 

timeframeInput = input.timeframe("D", "Timeframe")
sourceInput = input.source(hl2, "Source")
periodInput = input(1, "Period")

btc_cap = request.security(input.symbol("BTC_MARKETCAP", "Symbol") , timeframeInput, ta.sma(sourceInput, periodInput))
eth_cap = request.security(input.symbol("ETH_MARKETCAP", "Symbol") , timeframeInput, ta.sma(sourceInput, periodInput))
crypto_cap = request.security(input.symbol("TOTAL", "Symbol") , timeframeInput, ta.sma(sourceInput, periodInput))
usdc_cap = request.security(input.symbol("USDC_MARKETCAP", "Symbol") , timeframeInput, ta.sma(sourceInput, periodInput))
usdt_cap = request.security(input.symbol("USDT_MARKETCAP", "Symbol") , timeframeInput, ta.sma(sourceInput, periodInput))
busd_cap = request.security(input.symbol("BUSD_MARKETCAP", "Symbol") , timeframeInput, ta.sma(sourceInput, periodInput))
dai_cap = request.security(input.symbol("DAI_MARKETCAP", "Symbol") , timeframeInput, ta.sma(sourceInput, periodInput))


index = (crypto_cap - eth_cap - btc_cap - usdc_cap - usdt_cap - busd_cap - dai_cap) / (crypto_cap - usdc_cap - usdt_cap - busd_cap - dai_cap) *100

plot(index)
