tlk.kizur

BO indicator

44
Binary Options Indicator
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
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