Hello everyone I'm looking to create an alert every time this tradingview indicator changes his colors !
This is the script, could you help me please ?
//@version=3
study("OBOS")
hline(100)
hline(-100)
length=input(9,title="Lenggth")
ys1=(high+low+close*2)/4
rk3=ema(ys1,length)
rk4=stdev(ys1,length)
rk5=(ys1-rk3)*100/rk4
rk6=ema(rk5,length)
up=ema(rk6,length)
down=ema(up,length)
Oo=up<down?up:down
Hh=Oo
Ll=up<down?down:up
Cc=Ll
barcolor2=Oo[1]<Oo and Cc<Cc[1]?blue:up>down?green:red
plotcandle(Oo,Hh,Ll,Cc,color=barcolor2)
Create an alert every time this indicator changes his colors. So when he changes from green / blue / red
barcolor2is the variable that holds the color information. You can use this to see if it is a new color and set your alerts.