BULL RUNNERS MA 200-800
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © fedexan

//@version=4
study(title="BULL RUNNERS MA", shorttitle="Double MA", overlay=true, resolution="")

type = input(defval="Custom", options=["7-21", "11-22", "200-800", "Custom"], title="Preset:")

M1 = input(200, minval=1, title="Custom M1")
M2 = input(800, minval=1, title="Custom M2")

src = input(close, title="Source")

len1 = 0
len2 = 0

if type=="7-21"
    len1 := 7
    len2 := 21
if type=="11-22"
    len1 := 11
    len2 := 22
if type=="200-800"
    len1 := 200
    len2 := 800
if type=="Custom"
    len1 := M1
    len2 := M2
    
out1 = sma(src, len1)
out2 = sma(src, len2)

plot(out1, color=color.blue, title="M1")
plot(out2, color=color.orange, title="M2")