EMA pullback strategy with RSI: rules and how to test
By Oalgo · Last reviewed
A trend pullback strategy has two parts. A trend filter says the trend is up, for example the close is above a 50-period EMA. An entry rule then waits for a short dip, for example RSI falling below 40. The filter keeps the rule out of dips in a down-trend.
What are the rules of an EMA pullback strategy?
#- Trend filter: the close is above the 50-period EMA.
- Entry: RSI over 14 candles falls below 40 while the filter is true. RSI in an up-trend often stays above 30, so people use a shallower level such as 40.
- Exit: RSI rises above 60, or the close falls below the EMA, so the trend filter fails.
- Stop: a Stop Loss as a percentage.
How do you write this strategy in Oalgo?
#In Oalgo you can tell Oalgo AI your pullback rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.
For example, you could tell Oalgo AI: "Enter when the close is above the 50-period EMA and RSI (14) is below 40. Exit when RSI rises above 60 or the close falls below the EMA. Use a 2% Stop Loss and a 4% exit target." These numbers are examples to change. In the builder the two entry conditions are joined with an AND block, so both must be true at the same time. A Live Strategy needs a stop on each side it can enter, and an exit target is optional. The example names both.
How do you test this strategy honestly?
#- Run a backtest on a rising period and on a falling one. The filter should keep the rule out of the fall. The report shows whether it does.
- Check the number of trades. Two conditions together can leave very few entries, and a few trades say little.
- Count the settings: 50, 14, 40, 60. Every one can be fitted to the past. Move each a little and see what changes.
- Run a forward test on new prices, with simulated funds.
What can an EMA pullback strategy not tell you?
#The filter follows price, so a trend that ended some candles ago can still pass it. A dip inside an up-trend can also be the start of a turn. With four settings the rule has more room to be fitted to one period than a rule with one or two. Test it on dates you did not tune it on.
Read next
- Moving averages: SMA and EMA explainedA moving average smooths price into one line. Learn how the SMA and EMA are calculated, how they differ, and how to use them in your own rules.
- What is RSI? The RSI indicator explainedThe RSI indicator compares recent up moves with down moves on a scale from 0 to 100. Learn how it is calculated, how to read it, and how to test RSI rules.