PROTECTED SOURCE SCRIPT

Cruce 9-21

44
//version=5
indicator("Cruce 9-21", overlay=true)

// ----------------------------
// Inputs básicos
// ----------------------------
showShapes = input.bool(true, "Mostrar flechas")
bbLen = input.int(20, "BB Length")
bbMult = input.float(2.0, "BB Mult", step=0.1)

// ----------------------------
// Cálculos
// ----------------------------
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)

// Bollinger Bands
basis = ta.sma(close, bbLen)
dev = bbMult * ta.stdev(close, bbLen)
bbUpper = basis + dev
bbLower = basis - dev

// ----------------------------
// Señales SIMPLE BASE (solo EMAs + BB)
// ----------------------------
longCond = ta.crossover(ema9, ema21) and close > basis
shortCond = ta.crossunder(ema9, ema21) and close < basis


// Flechas
plotshape(showShapes and longCond, title="Long", style=shape.triangleup, location=location.belowbar, text="CALL", size=size.normal)
plotshape(showShapes and shortCond, title="Short", style=shape.triangledown, location=location.abovebar, text="PUT", size=size.normal)

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.