//Bollinger Bands length = input(20, minval=1) src = input(close, title="Source") mult = input(2.0, minval=0.001, maxval=50) basis = sma(src, length) dev = mult * stdev(src, length) upper = basis + dev lower = basis - dev p1 = plot(upper, title = "BB_UPPER", color=black, linewidth=3) p2 = plot(lower, title = "BB_LOWER", color=black, linewidth=3) fill(p1, p2)
// MA plot(ema(close,6), title = "EMA 6", color = #FF9500, linewidth=3) plot(sma(close,20), title = "SMA 20", color = blue, linewidth=3) plot(sma(close,50), title = "SMA 50", color = blue, linewidth=3) plot(sma(close,200), title = "SMA 200", color = red, linewidth=3)
// Parabolic SAR start = input(2, minval=0, maxval=10, title="Start - Default = 2 - Multiplied by .01") increment = input(2, minval=0, maxval=10, title="Step Setting (Sensitivity) - Default = 2 - Multiplied by .01" ) maximum = input(2, minval=1, maxval=10, title="Maximum Step (Sensitivity) - Default = 2 - Multiplied by .10") sus = input(true, "Show Up Trending Parabolic Sar") sds = input(true, "Show Down Trending Parabolic Sar") disc = input(false, title="Start and Step settings are *.01 so 2 = .02 etc, Maximum Step is *.10 so 2 = .2") startCalc = start * .01 incrementCalc = increment * .01 maximumCalc = maximum * .10 sarUp = sar(startCalc, incrementCalc, maximumCalc) sarDown = sar(startCalc, incrementCalc, maximumCalc) colUp = close >= sarDown ? lime : na colDown = close <= sarUp ? red : na plot(sus and sarUp ? sarUp : na, title="Up Trending SAR", style=circles, linewidth=3,color=colUp) plot(sds and sarDown ? sarDown : na, title="Up Trending SAR", style=circles, linewidth=3,color=colDown)
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.