PROTECTED SOURCE SCRIPT
Cruce 9-21

//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)
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)
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.