This strategy generates trading signals based on a triple confluence of Exponential Moving Averages (EMA), the Relative Strength Index (RSI), and MACD histogram momentum.
//@version=5
strategy("Triple Confluence (EMA+RSI+MACD)", overlay=true,
default_qty_type=strategy.percent_of_equity, default_qty_value=10)
emaFast = input.int(50, "EMA Fast")
emaSlow = input.int(200, "EMA Slow")
rsiLen = input.int(14, "RSI Period")
slAtrMult = input.float(2.0, "SL ATR Mult")
emaF = ta.ema(close, emaFast)
emaS = ta.ema(close, emaSlow)
rsiV = ta.rsi(close, rsiLen)
[macdL, sigL, hist] = ta.macd(close, 12, 26, 9)
atrV = ta.atr(14)
longCond = emaF > emaS and close > emaF and rsiV > 50 and rsiV < 70 and hist > 0 and macdL > sigL and hist > hist[1]
shortCond = emaF < emaS and close < emaF and rsiV > 30 and rsiV < 50 and hist < 0 and macdL < sigL and hist < hist[1]
if longCond and strategy.position_size == 0
sl = close - slAtrMult * atrV
risk = close - sl
strategy.entry("TC L", strategy.long)
strategy.exit("X", "TC L", stop=sl, limit=close + risk * 2.5)
if shortCond and strategy.position_size == 0
sl = close + slAtrMult * atrV
risk = sl - close
strategy.entry("TC S", strategy.short)
strategy.exit("X", "TC S", stop=sl, limit=close - risk * 2.5)
plot(emaF, "EMA Fast", color.aqua)
plot(emaS, "EMA Slow", color.orange)
plotshape(longCond, "L", shape.triangleup, location.belowbar, color.lime)
plotshape(shortCond, "S", shape.triangledown, location.abovebar, color.red)
alertcondition(longCond, "TC Long", "Triple Confluence LONG")
alertcondition(shortCond, "TC Short", "Triple Confluence SHORT")
Overview
Long entries require a fast EMA above a slow EMA, price above the fast EMA, RSI between 50 and 70, and a positive, rising MACD histogram. Short entries mirror these conditions in reverse. Risk management uses an ATR-based dynamic stop loss and a fixed 2.5 R:R profit target. It plots fast and slow EMAs alongside entry signals directly on the price chart.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
EMA Fast
int
50
emaFast
EMA Slow
int
200
emaSlow
RSI Period
int
14
rsiLen
SL ATR Mult
float
2.0
slAtrMult
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
2 EMA/SMA + RSI Strategy [Alorse] combines three configurable moving averages with a short-period Relative Strength Index filter. It plots fast, slow, and trend moving averages on the price chart. Long entries trigger when the fast moving average is above the
This strategy plots on the price chart and opens long or short positions when a weighted score from MACD, Stochastic RSI, RSI, Supertrend and a moving-average crossover exceeds a user-set trigger. Each component has its own weight and candle delay. Entries can
This strategy combines Arnaud Legoux Moving Average percentage price change calculations with an adaptive Gaussian Moving Average to generate trend-following signals. Long and short entries are triggered when the ALMA change calculation crosses above or below
This strategy generates trading signals based on a selectable momentum engine, supporting MACD, RSI, Stochastic, or Rate of Change. Entries trigger on signal crosses, zero-line crosses, or threshold crosses, with an optional moving average trend filter. Risk m
255 EMA Strategy combines an exponential moving average with Average True Range bands and standard MACD crossovers to generate entry signals. Drawn directly on the price chart, it plots the central 255 EMA along with upper and lower volatility envelopes. Trade
This strategy evaluates simple moving averages and the Relative Strength Index to generate trading signals. It calculates a 10-period SMA, a 30-period SMA, and a 14-period RSI. Long positions are entered when the fast SMA crosses above the slow SMA while RSI i