OPEN-SOURCE SCRIPT
9 & 15 EMA Strategy [Trade Room]

OVERVIEW
This indicator combines a fast/slow EMA crossover (default 9 and 15) with a
trend-slope filter and price-action candle confirmation to generate long and
short signals, along with automatically calculated take-profit and stop-loss
levels based on a user-defined risk:reward ratio.
The EMA 9/15 crossover is a long-standing, widely taught trend-following
concept in retail trading education. This script is my own original
implementation of that concept, built with additional filters to reduce
false signals in choppy conditions.
HOW IT WORKS
1. Trend filter: the script checks whether the fast EMA is above or below
the slow EMA to establish bullish or bearish bias.
2. Slope filter (optional): both EMAs must be sloping steeply enough,
measured as percentage change over a short lookback, to confirm the
move has real momentum rather than chopping sideways. This is adjustable
so it can be tuned per instrument and timeframe.
3. Price action filter (optional): a signal only fires when price pulls
back to the fast EMA and the resulting candle matches one of three
patterns — pin bar, engulfing, or an above-average range "big bar" —
in the direction of the trend.
4. TP/SL: stop-loss is placed at the signal candle's high/low, and take-
profit is calculated as a multiple of that risk distance, set by the
Risk:Reward input (default 1:2).
WHY IT'S USEFUL
Most EMA crossover scripts only plot crossovers, leaving the trader to
manually judge trend strength and risk levels. This script adds an
objective slope threshold and candle-pattern confirmation layer on top of
the crossover, and automatically plots calculated TP/SL levels so risk
is defined before entry, not after.
SETTINGS
- Fast/Slow EMA length — fully adjustable, not fixed to 9/15
- Slope filter toggle and threshold — tune sensitivity per asset/timeframe
- Candle pattern filter toggle
- Risk:Reward ratio for TP calculation
- Independent show/hide toggles for EMAs, labels, TP, and SL
- Alert conditions for both signal types
LIMITATIONS
Like any trend-following tool, this indicator will produce false signals
in ranging or low-volatility conditions. The slope filter is designed to
reduce — not eliminate — this. No indicator predicts price; this is a
decision-support tool, not financial advice, and past signal behavior is
not indicative of future results. Always backtest on your specific
instrument and timeframe and use proper risk management.
This indicator combines a fast/slow EMA crossover (default 9 and 15) with a
trend-slope filter and price-action candle confirmation to generate long and
short signals, along with automatically calculated take-profit and stop-loss
levels based on a user-defined risk:reward ratio.
The EMA 9/15 crossover is a long-standing, widely taught trend-following
concept in retail trading education. This script is my own original
implementation of that concept, built with additional filters to reduce
false signals in choppy conditions.
HOW IT WORKS
1. Trend filter: the script checks whether the fast EMA is above or below
the slow EMA to establish bullish or bearish bias.
2. Slope filter (optional): both EMAs must be sloping steeply enough,
measured as percentage change over a short lookback, to confirm the
move has real momentum rather than chopping sideways. This is adjustable
so it can be tuned per instrument and timeframe.
3. Price action filter (optional): a signal only fires when price pulls
back to the fast EMA and the resulting candle matches one of three
patterns — pin bar, engulfing, or an above-average range "big bar" —
in the direction of the trend.
4. TP/SL: stop-loss is placed at the signal candle's high/low, and take-
profit is calculated as a multiple of that risk distance, set by the
Risk:Reward input (default 1:2).
WHY IT'S USEFUL
Most EMA crossover scripts only plot crossovers, leaving the trader to
manually judge trend strength and risk levels. This script adds an
objective slope threshold and candle-pattern confirmation layer on top of
the crossover, and automatically plots calculated TP/SL levels so risk
is defined before entry, not after.
SETTINGS
- Fast/Slow EMA length — fully adjustable, not fixed to 9/15
- Slope filter toggle and threshold — tune sensitivity per asset/timeframe
- Candle pattern filter toggle
- Risk:Reward ratio for TP calculation
- Independent show/hide toggles for EMAs, labels, TP, and SL
- Alert conditions for both signal types
LIMITATIONS
Like any trend-following tool, this indicator will produce false signals
in ranging or low-volatility conditions. The slope filter is designed to
reduce — not eliminate — this. No indicator predicts price; this is a
decision-support tool, not financial advice, and past signal behavior is
not indicative of future results. Always backtest on your specific
instrument and timeframe and use proper risk management.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.