// Condiciones para señales buySignal = close > sma and rsi < oversold and volume > avgVolume * volumeThreshold sellSignal = close < sma and rsi > overbought and volume > avgVolume * volumeThreshold
// Dibujar señales en el gráfico plotshape(series=buySignal, title="Compra", location=location.belowbar, color=color.green, style=shape.labelup, text="COMPRA") plotshape(series=sellSignal, title="Venta", location=location.abovebar, color=color.red, style=shape.labeldown, text="VENTA")
// Dibujar la Media Móvil plot(sma, title="Media Móvil", color=color.blue, linewidth=2)
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publications is governed by House rules. 您可以收藏它以在圖表上使用。