Bitcoin Cycles Indicator
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © VanHe1sing

//@version=5
indicator("Bitcoin Cycles", shorttitle = "BTC: Cycles", overlay = true)
MCR = request.security("COINMETRICS:BTC_MARKETCAPREAL","D",close)
TV = ta.sma(request.security("GLASSNODE:BTC_TOTALVOLUME","D",close), 500) //Total Volume of transfer

//Cycles
cycle = (MCR-TV) / 23000000

multi = 1.5

cycle1= cycle * multi,
     multi += 1,
     cycle2= cycle * multi,
         multi += 1,
         cycle3= cycle * multi,
             multi += 1,
             cycle4= cycle * multi



plot(cycle, color = color.green), 
     plot(cycle1, color = color.aqua), 
         plot(cycle2, color = color.purple), 
             plot(cycle3, color = color.orange), 
                 plot(cycle4, color = color.red)


label_(cycle, name, color)=>
    lbl = label.new(na, na, textcolor = color)
    label.set_xy(lbl, bar_index+150, cycle/1.05)
    label.set_style(lbl, label.style_none)
    label.set_text(lbl, name)

if barstate.islast
    label_(cycle, "Cycle Lows", color.green),
       label_(cycle1, "Under Valued", color.aqua),
           label_(cycle2, "Fair Market Value", color.purple),
               label_(cycle3, "Aggressively Values", color.orange),
                   label_(cycle4, "Over Valued", color.red)

