//@version=4 study(shorttitle="Trend stratégie V.3", title="Trend stratégie V.3", overlay=true, resolution="") src = input(close, title = "Source") length = input(55, minval=1, title = "SMA length")// 20 for classis Bollinger Bands SMA line (basis) CC = input(true, "Color Bars") mult = input(1., minval=0.236, maxval=2.5, title="Standard Deviation")//2 for Classic Bollinger Bands //Maxval = 2 as higher the deviation, higher the risk basis = sma(src, length) dev = mult * stdev(src,length) upper = basis + dev lower = basis - dev //Conditions for Long and Short - Extra filter condition can be used such as RSI or CCI etc. short = srcupper and rsi(close,14)>70 L1 = barssince(long) S1 = barssince(short) longSignal = L1upper?color.new(#009688,0): srcbasis?color.green: src