Bitcoin Bull Runs Mid Cycle Aligned 
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ShitCoinInc

//@version=4
study("Bitcoin Bull Run Cycles", overlay=true)

var dX6 = input(1465, title="2016 Mid Cycle Daily X Offset", type=input.integer)
var wX6 = input(210,  title="2016 Mid Cycle Weekly X Offset", type=input.integer)
var mX6 = input(48,   title="2016 Mid Cycle Monthly X Offset", type=input.integer)
var Y6 = input(15, title="2016 Monthly Y Offset", type=input.integer)

var dX3 = input(2936, title="2013 Mid Cycle Daily X Offset", type=input.integer)
var wX3 = input(420,  title="2013 Mid Cycle Weekly X Offset", type=input.integer)
var mX3 = input(916,   title="2013 Mid Cycle Monthly X Offset", type=input.integer)
var Y3 = input(445, title="2013 Monthly Y Offset", type=input.integer)

var xOffset6 = 0
var xOffset3 = 0

if timeframe.isdaily
    xOffset6 := dX6
    xOffset3 := dX3
else if timeframe.isweekly
    xOffset6 := wX6
    xOffset3 := wX3
else if timeframe.ismonthly
    xOffset6 := mX6
    xOffset3 := mX3
else
    Y6 := 0
    Y3 := 0

plot(close*Y6, title='', color=color.new(#00ffaa, 1), linewidth=1, style=plot.style_line, offset=xOffset6, trackprice=false)
plot(close*Y3, title='', color=color.red, linewidth=1, style=plot.style_line, offset=xOffset3, trackprice=false)



