Rsi, Ema , Ma and Bollinger Bands for 1 min Btcusdt
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © lepstick-TC
//@version=4
strategy("1", overlay=true)
length = input(5, minval=1)
src = input(close, title="Source")
mult = input(1.5, minval=0.001, maxval=50)
basis = sma(src, length)
dev = mult * stdev(src, length)
upper = basis + dev
lower = basis - dev
plot(basis, color=color.red)
p1 = plot(upper, color=color.blue)
p2 = plot(lower, color=color.blue)
fill(p1, p2)
rsicok=input(75,minval=0,title="Rsi yüksek")
rsiaz=input(25,maxval=50,title="Rsi düşük")
rsizaman=input(7,minval=0,title="Rsi zaman")
smadeger=input(10,minval=0,title="Ma üst")
smadeger2=input(5,minval=0,title="Ma alt")
emadeger=input(30,minval=0,title="Ema üst")
emadeger2=input(20,minval=0,title="Ema alt")
myrsi=rsi(close,rsizaman)
myrsi2=rsi(close,rsiaz)
myrsi3=rsi(close,rsicok)
myma=sma(close,smadeger)
myma2=sma(close,smadeger2)
myema=ema(close,emadeger)
myema2=ema(close,emadeger2)
mycond =myrsi >rsicok and close> myma and close>myema
mycond2=myrsi<rsiaz and close<myma2 and close<myema2
barcolor(mycond? #2196F3: na)
barcolor(mycond2? #FF9800: na)
plot(myma,title="Ma yüksek",color=color.black,linewidth=0)
plot(myma2,title="Ma düşük",color=color.blue,linewidth=0)
plot(myema,title="Ema yüksek",color=color.yellow,linewidth=0)
plot(myema2,title="Ema düşük",color=color.gray,linewidth=0)
idunno =close< sma(close,smadeger2) and close < sma(close,smadeger) and close<ema(close,emadeger)and close<ema(close,emadeger2)and crossunder(close,lower)and crossunder(myrsi,myrsi2)and crossunder(close,basis) 
plotchar(idunno,char="A",color=#808000 ,location=location.belowbar) 
idunno2 =close> sma(close,smadeger2) and close> sma(close,smadeger) and close>ema(close,emadeger)and close>ema(close,emadeger2)and crossover(close,upper)and crossover(myrsi,myrsi3)and crossover(close,basis)
plotchar(idunno2,char="S",color=#787B86 ,location=location.abovebar)
strategy.entry("Al",true,when =idunno)
strategy.entry("Sat",false,when = idunno2)
strategy.close("Al",when=ema(close,emadeger)and crossover(open,upper))
strategy.close("Sat",when=sma(close,smadeger2)and crossunder(open,lower))
//strategy.exit("Al çıkış","Al",limit=upper)
//strategy.exit("Sat çıkış","Sat",limit=lower)
//strategy.exit("Al çıkış","Al",trail_points=close*0.1/syminfo.mintick,trail_offset=close*0.005/syminfo.mintick)
//strategy.exit("Sat çıkış","Sat",trail_points=close*0.1/syminfo.mintick,trail_offset=close*0.005/syminfo.mintick)
