Crypto Market Caps (BTC, ETH, TOTAL3)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © BigPhilBxl

//@version=5
indicator('Crypto Market Caps (BTC, ETH, TOTAL3)')

// inputs
int length = input.int(21, 'RSI length', group='Settings')
btc = input.symbol(title='Market Cap BTC', defval='CRYPTOCAP:BTC', group='Market Cap')
eth = input.symbol(title='Market Cap ETH', defval='CRYPTOCAP:ETH', group='Market Cap')
total3 = input.symbol(title='Market Cap Total3', defval='CRYPTOCAP:TOTAL3', group='Market Cap')

// hlines
hline(30, 'Low')
hline(50, 'Medium', linewidth=2)
hline(70, 'High')

// Get BTC & alt market caps
b = request.security(btc, timeframe=timeframe.period, expression=close)
e = request.security(eth, timeframe=timeframe.period, expression=close)
t3 = request.security(total3, timeframe=timeframe.period, expression=close)

// RSI
rsi_b = ta.rsi(b, length)
rsi_e = ta.rsi(e, length)
rsi_t3 = ta.rsi(t3, length)

// Plot
plot(rsi_b, 'BTC', color=color.new(color.orange, 0))
plot(rsi_e, 'ETH', color=color.new(color.gray, 0))
plot(rsi_t3, 'TOTAL3', color=color.new(color.blue, 0))

