OPEN-SOURCE SCRIPT

CCI Buy Signal

已更新
CCI BUY SIGNAL WEEKLY indicator to buy MF ETF on index for long term
發行說明
cci indicator to buy weekly tf etf mutual fund for long term duration
發行說明
//version=5
indicator("CCI Buy Signal", overlay=true)

// Inputs for CCI
length = input.int(14, title="CCI Length")
src = input.source(close, title="Source")

// Calculate CCI
cci = ta.cci(src, length)
prev_cci = ta.valuewhen(bar_index > 0, cci[1], 0)

// Buy condition
buySignal = (cci < -100) and (cci > prev_cci)

// Plot Buy Signal as Arrow on Chart
plotshape(buySignal, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, title="Buy Signal Arrow")
發行說明
//version=5
indicator("CCI Buy Signal", overlay=true)

// Inputs for CCI
length = input.int(14, title="CCI Length")
src = input.source(close, title="Source")

// Calculate CCI
cci = ta.cci(src, length)
prev_cci = ta.valuewhen(bar_index > 0, cci[1], 0)

// Buy condition
buySignal = (prev_cci < -200) and (cci > prev_cci) and (cci > -200)

// Plot Buy Signal as Arrow on Chart
plotshape(buySignal, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, title="Buy Signal Arrow")
Bill Williams IndicatorsbuyCommodity Channel Index (CCI)indexOscillatorsWeekly Charts

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明