BTC HASHRATE DROP: Onchain
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © MJShahsavar

//@version=5
indicator("BTC HASHRATE DROP: Onchain", timeframe = "D")
//@version=5
R = input.symbol("BTC_HASHRATE", "Symbol")
r = request.security(R, 'D', close)
D = ta.sma(r, 50)
M = ta.rsi(D, 14)
h1=hline (80)
h2= hline (20)
h3= hline (50)
h4= hline (120)
h5 = hline (140)
hashColor = M >= 80 ? color.blue : M <= 20 ? color.red : color.maroon
fill (h5, h4, hashColor)
plot (M, "hashColor" ,  M >= 80 ? color.blue : M <= 20 ? color.red : color.maroon,  linewidth=1)
