RSI Trading Strategy Improvements with Time Filter and Stop Loss
The Relative Strength Index has historically shown strong improvements when we limit its trades to specific times of day, but what kind of risk/reward profile could we use to make the time-limited RSI a viable trading strategy? This article looks to improve on previous results to attempt to make this a winning trading strategy.
Relative Strength Index – Range Trading Strategy of Choice, but How Can it be Improved? Shutting off RSI Strategy during most volatile times of day
As a recap of our previous article, the raw RSI strategy has been rather underwhelming on a 15-minute EURUSD chart going back to 2001. We used a time filter to limit its trading to the hours of 14:00 to 06:00 Eastern Time to good effect in the Euro/US Dollar. Yet our backtests showed that the strategy would perform best if we kept existing trades open even outside of our trading window.
Benchmark RSI Strategy on EURUSD 15-minute Chart from 2001-2011
After Time-Based Filter
Source: FXCM Strategy Trader.
Yet such an approach would leave us vulnerable to sizeable losses without any way to exit trades through the “off hours” of the time filter. We already have some experience setting stops and losses for the RSI strategy and have a general sense of what type of risk/reward these strategies may offer.
Using the same techniques, we will look to see what type of risk/reward profiles offer the best historical returns on said system.
Optimization Charts on Time-Filtered Relative Strength Index Trading Strategy
In the last RSI article, we had looked at the standard RSI trading strategy and saw that historical performance improved considerably if we limited trading to specific hours of the day. Yet our rules likewise showed that backtests worked best if we left trades open with no stop losses of any sort through some of the most volatile times of the day.
Such a tactic leaves us exposed to theoretically limitless intraday losses, as our strategy is unable to close trades outside of a fixed period of time. Through the past we have looked at placing fixed stop losses on trading strategies, but that ignores shifting dynamics in currency volatility over time. This time around we will take a look at setting a stop loss and profit target based on a pair’s medium-term ATR—a metric that will give us a sense of recent market conditions before setting maximum position risk.
RSI Trading Strategy with Time Filter, using Stop Loss and Profit Targets
Using Strategy Trader, we can code our custom-coded strategy with the following rules.
Entry Rule: When the 14-period RSI crosses above 30, buy at market on the open of the next bar. When RSI crosses below 70, sell at market on the open of the next bar.
Filter: Strategy can only enter trades between the start hour (14:00 ET) and end hour (06:00 ET). Yet it will not close any open trades at end hour and will hold them open until the reverse signal is triggered. (Stop Losses and Profit Targets will work at all hours)
Stop Loss:The stop loss is set as a percentage of the pair’s 90-day Average True Range (ATR). If set to “0”, no stop loss is used.
Take Profit: The take profit is set as a percentage of the pair’s 90-day Average True Range (ATR). If Take Profit is set to “0”, no take profit is used.
Exit Rule: Strategy will exit a trade and flip direction when the opposite signal is triggered.
Finding Top Historical Performance Using Stops and Limits
Using the parameters we found to work best in our first article, we will go through and attempt to further use stop losses and profit targets to maximize historical performance in our strategy. We do this of course in the hopes that what has worked in the past has a reasonably strong chance of working in the future. It is a bit difficult to display a 3-dimensional chart within a 2-dimensional medium, but the chart below should give a general sense of which Stop Loss and Take Profit levels have historically performed best in the Euro/US Dollar currency pair.
When we optimize, we are trying to maximize risk-adjusted returns. In practical terms, this means that we are looking for parameters that maximize final returns against maximum losses. In Strategy Trader, the “Return on Account” metric calculates final dollar returns against the maximum drawdown—giving us a good proxy for reward to risk ratios.
Risk-Adjusted Returns in the Time-Filtered RSI Strategy by Stop Loss and Target Level
Graph Source: R, RGL Package
The Z axis in our chart shows us our Return on Account based on the StopLoss level and ProfitTarget. We see a fairly pronounced peak in performance at a very specific StopLoss level, while our maximum gain actually comes with no fixed TakeProfit used (variable is set to ‘0’).
Perhaps unsurprisingly, risk-adjusted returns improve noticeably when we set a fixed maximum loss level. In this case the performance peak occurs when our maximum risk is set to one full 90-day Average True Range (ATR)—our multiplier at 1.0. As of time of writing, the Euro/US Dollar’s 90-day ATR stood at 144 pips and hit as high as 275 pips through late 2008. Thus our max stop level is actually fairly wide, but it seems as though tighter stop losses have produced poorer risk-adjusted returns through our sampling period.
Download the code to your own Strategy Trader and test out the system for yourself. Let us know what you think on the forum page.
If you would like to suggest ideas for this topic or any other forex strategy you would like to see in this series, feel free to e-mail author David Rodríguez at email@example.com.
To be added to this author’s distribution list, e-mail with subject line “distribution list”
Written by David Rodríguez, Quantitative Strategist for DailyFX.com
DailyFX provides forex news and technical analysis on the trends that influence the global currency markets.