kvande97

IP Bounce

9
Bounces
開源腳本

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

免責聲明

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

想在圖表上使用此腳本?
study(title="IP Bounce", shorttitle="CBS", overlay=true)

// INDICATOR SETTINGS
ema50 = ema(close, 50)
ema20 = ema(close, 20)
ema7 = ema(close, 7)
ema3 = ema(close, 3)
atrs = (offset(atr(3), 1) / atr(3))
// chop = ()

// PLOT EMA LINES
plot(ema50, color=red, title="50 EMA")
plot(ema20, color=blue, title="20 EMA")
plot(ema7, color=white, title="7 EMA")
plot(ema3, color=yellow, title="3 EMA")

// CRITERIA FOR 20 EMA BOUNCE SETUPS
b20buy = (ema20 > ema50) and (open > ema20) and (close > ema20) and (low < ema20) and (atrs >= 1)
b20sell = (ema20 < ema50) and (open < ema20) and (close < ema20) and (high > ema20) and (atrs >= 1)

// CRITERIA FOR 50 EMA BOUNCE SETUPS
b50buy = (ema20 > ema50) and (open > ema50) and (close > ema50) and (low < ema50) and (atrs >= 1)
b50sell = (ema20 < ema50) and (open < ema50) and (close < ema50) and (high > ema50) and (atrs >= 1)

// PLOT CRITERIA FOR 20 EMA BOUCE SETUPS
B2B = iff(b20buy == 1 and b50buy == 0, 1, 0)
plotshape(B2B, style=shape.arrowup, color=green, location=location.belowbar, text="B2", textcolor=white, title="20 EMA Long")
B2S = iff(b20sell == 1 and b50sell == 0, 1, 0)
plotshape(B2S, style=shape.arrowdown, color=red, location=location.abovebar, text="B2", textcolor=white, title="20 EMA Short")

// PLOT CRITERIA FOR 50 EMA BOUNCE SETUPS
B5B = iff(b20buy == 0 and b50buy == 1, 1, 0)
plotshape(B5B, style=shape.arrowup, color=green, location=location.belowbar, text="B5", textcolor=white, title="50 EMA Long")
B5S = iff(b20sell == 0 and b50sell == 1, 1, 0)
plotshape(B5S, style=shape.arrowdown, color=red, location=location.abovebar, text="B5", textcolor=white, title="50 EMA Short")

// PLOT CRITERIA FOR 20 EMA BOUNCE AND 50 EMA BOUNCE SETUPS
B2B5B = iff(b20buy == 1 and b50buy == 1, 1, 0)
plotshape(B2B5B, style=shape.arrowup, color=green, location=location.belowbar, text="B2B5", textcolor=white, title="Both EMA Long")
B2B5S = iff(b20sell == 1 and b50sell == 1, 1, 0)
plotshape(B2B5S, style=shape.arrowdown, color=red, location=location.abovebar, text="B2B5", textcolor=white, title="Both EMA Short")