PROTECTED SOURCE SCRIPT

Cruce 9-21

45
//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)

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。