OPEN-SOURCE SCRIPT
Empty Candle

//version=5
indicator("5–6 signals per day (Stable)", overlay=true)
// ─────── Inputs ───────
emaLen = input.int(50, "EMA Length", minval=10)
rsiLen = input.int(14, "RSI Length", minval=5)
volMult = input.float(1.3, "Volume multiplier", minval=1.0, step=0.1)
rsiOverb = input.int(65, "RSI Overbought", minval=50, maxval=90)
rsiOvers = input.int(35, "RSI Oversold", minval=10, maxval=50)
// ─────── Calculations ───────
ema = ta.ema(close, emaLen)
rsi = ta.rsi(close, rsiLen)
volMA = ta.sma(volume, 20)
// ─────── Trend ───────
bullTrend = close > ema
bearTrend = close < ema
volSpike = volume > volMA * volMult
// ─────── Base conditions ───────
baseBuy = bullTrend and rsi < rsiOvers and volSpike and close > open
baseSell = bearTrend and rsi > rsiOverb and volSpike and close < open
// ─────── EMA press logic ───────
emaPressBuy = close > open and open < ema and close > ema
emaPressSell = close < open and open > ema and close < ema
// ─────── Final signals ───────
buyCond = baseBuy or emaPressBuy
sellCond = baseSell or emaPressSell
// ─────── Signals (STRICTLY BAR-ANCHORED) ───────
plotshape(
buyCond,
title="BUY",
style=shape.triangleup,
location=location.belowbar,
color=color.lime,
size=size.small
)
plotshape(
sellCond,
title="SELL",
style=shape.triangledown,
location=location.abovebar,
color=color.red,
size=size.small
)
// ─────── EMA ───────
plot(ema, title="EMA", color=color.new(color.blue, 30), linewidth=2)
indicator("5–6 signals per day (Stable)", overlay=true)
// ─────── Inputs ───────
emaLen = input.int(50, "EMA Length", minval=10)
rsiLen = input.int(14, "RSI Length", minval=5)
volMult = input.float(1.3, "Volume multiplier", minval=1.0, step=0.1)
rsiOverb = input.int(65, "RSI Overbought", minval=50, maxval=90)
rsiOvers = input.int(35, "RSI Oversold", minval=10, maxval=50)
// ─────── Calculations ───────
ema = ta.ema(close, emaLen)
rsi = ta.rsi(close, rsiLen)
volMA = ta.sma(volume, 20)
// ─────── Trend ───────
bullTrend = close > ema
bearTrend = close < ema
volSpike = volume > volMA * volMult
// ─────── Base conditions ───────
baseBuy = bullTrend and rsi < rsiOvers and volSpike and close > open
baseSell = bearTrend and rsi > rsiOverb and volSpike and close < open
// ─────── EMA press logic ───────
emaPressBuy = close > open and open < ema and close > ema
emaPressSell = close < open and open > ema and close < ema
// ─────── Final signals ───────
buyCond = baseBuy or emaPressBuy
sellCond = baseSell or emaPressSell
// ─────── Signals (STRICTLY BAR-ANCHORED) ───────
plotshape(
buyCond,
title="BUY",
style=shape.triangleup,
location=location.belowbar,
color=color.lime,
size=size.small
)
plotshape(
sellCond,
title="SELL",
style=shape.triangledown,
location=location.abovebar,
color=color.red,
size=size.small
)
// ─────── EMA ───────
plot(ema, title="EMA", color=color.new(color.blue, 30), linewidth=2)
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.