OPEN-SOURCE SCRIPT
RSI + EMA + Volume Breakout (Robust)

//version=5
indicator("RSI + EMA + Volume Breakout (Robust)", overlay=true)
// === INPUTS ===
ema1_len = input.int(20, "EMA Fast (Short)")
ema2_len = input.int(50, "EMA Slow (Long)")
rsi_len = input.int(14, "RSI Length")
vol_mult = input.float(1.5, "Volume Multiplier", step=0.1)
vol_sma_len = input.int(20, "Volume SMA Length")
// === INDICATORS ===
ema1 = ta.ema(close, ema1_len)
ema2 = ta.ema(close, ema2_len)
rsi = ta.rsi(close, rsi_len)
vol_avg = ta.sma(volume, vol_sma_len)
vol_avg_safe = nz(vol_avg) == 0 ? 1 : vol_avg // protect against zero
// === CONDITIONS ===
bull_cross = ta.crossover(ema1, ema2)
bear_cross = ta.crossunder(ema1, ema2)
vol_break = volume > vol_avg_safe * vol_mult
rsi_bull = rsi > 55
rsi_bear = rsi < 45
buy_signal = bull_cross and vol_break and rsi_bull and close > ema1 and close > ema2
sell_signal = bear_cross and vol_break and rsi_bear and close < ema1 and close < ema2
// === PLOT EMAs ===
plot(ema1, title="EMA 20", linewidth=2)
plot(ema2, title="EMA 50", linewidth=2)
// === SIGNALS ===
plotshape(buy_signal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.large)
plotshape(sell_signal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.large)
// === ALERTS ===
alertcondition(buy_signal, title="Buy Alert", message="Buy Signal Triggered")
alertcondition(sell_signal, title="Sell Alert", message="Sell Signal Triggered")
indicator("RSI + EMA + Volume Breakout (Robust)", overlay=true)
// === INPUTS ===
ema1_len = input.int(20, "EMA Fast (Short)")
ema2_len = input.int(50, "EMA Slow (Long)")
rsi_len = input.int(14, "RSI Length")
vol_mult = input.float(1.5, "Volume Multiplier", step=0.1)
vol_sma_len = input.int(20, "Volume SMA Length")
// === INDICATORS ===
ema1 = ta.ema(close, ema1_len)
ema2 = ta.ema(close, ema2_len)
rsi = ta.rsi(close, rsi_len)
vol_avg = ta.sma(volume, vol_sma_len)
vol_avg_safe = nz(vol_avg) == 0 ? 1 : vol_avg // protect against zero
// === CONDITIONS ===
bull_cross = ta.crossover(ema1, ema2)
bear_cross = ta.crossunder(ema1, ema2)
vol_break = volume > vol_avg_safe * vol_mult
rsi_bull = rsi > 55
rsi_bear = rsi < 45
buy_signal = bull_cross and vol_break and rsi_bull and close > ema1 and close > ema2
sell_signal = bear_cross and vol_break and rsi_bear and close < ema1 and close < ema2
// === PLOT EMAs ===
plot(ema1, title="EMA 20", linewidth=2)
plot(ema2, title="EMA 50", linewidth=2)
// === SIGNALS ===
plotshape(buy_signal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.large)
plotshape(sell_signal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.large)
// === ALERTS ===
alertcondition(buy_signal, title="Buy Alert", message="Buy Signal Triggered")
alertcondition(sell_signal, title="Sell Alert", message="Sell Signal Triggered")
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.