OPEN-SOURCE SCRIPT

BULL RUNNERS MA 200-800


study(title="BULL RUNNERS MA", shorttitle="BULLRUNNER 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")
Moving Averages

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer