tlk.kizur

BO indicator

44
Binary Options Indicator
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

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.

Want to use this script on a chart?
study(title="Binary Options Indicator",shorttitle="BO indicator",overlay=true)

// CCI
source = close, CCIlength = input(title="CCI Period",defval=9, minval=1)
CCIupLevel=input(100, minval=100,title="CCI up Level")
CCIdnLevel=input(-100,minval=-350,title="CCI dn Level")
ma = sma(source, CCIlength)
cci = (source - ma) / (0.015 * dev(source, CCIlength))
CCIband1 = hline(100, color=gray, linestyle=dashed)
CCIband0 = hline(-100, color=gray, linestyle=dashed)
//ShowCCI = input(false,type=bool,title="Show CCI Indicator")
//plot( ShowCCI ? cci : na)

// BB %inestyle=dashed)
BBsource = close
length = input(title="BB %B Period",type=integer,defval=20, minval=1)
mult = input(title="BB %B Multiplayer",defval=1.0, minval=0.001, maxval=50)
BBupLevel=input(1,title="BB %B Up Level")
BBdnLevel=input(0,title="BB %B Dn Level")
basis = sma(BBsource, length)
dev = mult * stdev(BBsource, length)
upper = basis + dev
lower = basis - dev
bbr = (BBsource - lower)/(upper - lower)

src = close, len = input(title="RSI Period",defval=7, minval=1)
RSIupLevel=input(70,minval=50,title="RSI Up Level")
RSIdnLevel=input(30,minval=0,title="RSI Down Level")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

// MA cross
ShowMA=input(false,type=bool,title="Show MACross indicator")

MAfast=input(9,title="Fast MA Period")
MAslow=input(21,title="Slow MA Period")
short = ema(close, MAfast)
long =  ema(close, MAslow)
plot(ShowMA ? short : na, color = red)
plot(ShowMA ? long  : na, color = green)


pu= (cci>CCIupLevel) and (rsi>RSIupLevel ) and (bbr>BBupLevel) and
            (open[1] > short[1] and close[1]>short[1])
pd= (cci<CCIdnLevel) and (rsi < RSIdnLevel) and (bbr < BBdnLevel) and 
            (open[1]< short[1] and close[1]<short[1]) 
plotCross= pu ? 1 : pd ? -1 : na

plot(ShowMA ? cross(short, long) ? short : na : na, style = cross, linewidth = 2 ,color=yellow )

plotarrow( plotCross , colorup=lime , colordown=red,transp=20 , minheight = 18 ,maxheight=20 )



newbar(res) => change(time(res)) != 0