EMA Pullback Strategy
This script's source code is protected by the author.
A trend-following strategy that takes EMA crossover signals only when they agree with the longer-term trend, then manages each trade with ATR-based risk.
How it works
Trend filter: The 200 EMA sets the bias. Longs only above it, shorts only below it. The line turns teal in an uptrend and red in a downtrend.
Entry signal: A long triggers when the 20 EMA crosses above the 50 EMA and RSI is above 50. A short triggers on the opposite cross with RSI below 50.
Risk management: Every trade gets a stop at 1.5x ATR from entry and a take-profit at 2:1 reward-to-risk. Both levels are plotted on the chart and printed on the entry label.
Early exit: If price closes back through the 200 EMA, the trade closes straight away instead of waiting for the stop or target.
On the chart
Fast, slow and trend EMAs
BUY / SELL labels showing the stop and target prices
Live stop and target lines while a trade is open
Background shading for long and short positions
A panel in the bottom right showing current position, stop, target, net profit and trades won
Settings
All lengths and risk values can be changed. Signal settings cover the fast, slow and trend EMA lengths, RSI length, and a toggle for short trades. Risk settings cover ATR length, stop multiplier and reward:risk.
Backtest defaults: 10,000 starting capital, 1 unit per trade, 0.05% commission, one position at a time.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by GoCharting. Read more in the Terms of Use.
Related Scripts
Comments (0)
Loading comments…


