Need More Help? Book Your FREE Strategy Session With Our Team Today!
We'll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.BOOK YOUR FREE STRATEGY SESSION NOW >>
What's the most effective way to use the Relative Strength Index (RSI) indicator in a trading strategy?
After talking about how to build and interpret this well-known oscillator, in this video, our coach Davide tests two different systems based on the RSI.
The first was built following the instructions provided by the RSI creator Wilder Welles, while in the second, the indicator is used as an operating filter.
Watch the video to find out which one works best!
Hi guys! Today we continue talking about the RSI. I am Davide Tagliabue, one of the coaches at the Unger Academy. In this video we will see together how to build a trading system on the RSI, or rather, "the" trading system on the RSI, that was proposed by the creator of this oscillator, Wilder Welles. We're also going to evaluate the RSI as an operational filter to discover something really interesting. But first, if you haven't done it yet, I invite you to subscribe to our channel and click on the bell in order to stay up to date on the release of new content.
Strategy based on Welles's instructions
Here is the first trading system we are going to see in this video. This code is the concretization of Wilder Welles's idea of how to use the RSI. What we see in the inputs is in line with what we said in the previous video. The periods to be considered for the RSI are 14, we are using daily bars, and the price to consider corresponds to the Close of the bars. Here you also see the inputs related to the Up Threshold and the Down Threshold, which are the upper and lower thresholds of the oscillator. So the overbought threshold will be marked by an RSI greater than 70, while the oversold threshold will be marked by an RSI of 30 or less. Then we have the inputs related to the stop loss and the take profit, which can also be added to the strategy.
As you can see, the code is really simple and there's nothing more than what you see here. On this line, which is one of the main ones, the value of the RSI is calculated. First of all, we take the price considered and the number of periods we want to evaluate. After that, following what Welles suggests, we buy at the exit of the oversold threshold and sell at the exit of the overbought threshold.
So what are we going to do? If my RSI value, the one I calculated earlier, crosses above my minimum threshold, which is equal to 30, we will buy the next bar at market. Conversely, if the RSI evaluated at the close of today's bar crosses under the Up Threshold , we will open a short position selling next bar at market.
As you can see, this system also allows us to set the stops and take profits based on the average range, that is, on the average monetary excursion of each instrument. This enables us to set a stop loss that is proportionate to the size of the market we are going to trade. At the moment, you see that the stop and profit multipliers are equal to 1. Then the value is multiplied by the 5-day Average True Range and the Big Point Value of the instrument we are going to trade.
So let's now test this idea on a basket of instruments, following the same procedure as in the previous videos. Here you can see a series of futures. There are the main ones, such as the Crude Oil, the EURUSD, the Standard & Poor 500 Index, the Dax Future, and so on. We will backtest them from 2010 to the present day. We are not going to change the default inputs of the strategy for now and we are using 1440-minute bars, that is, daily bars.
So let's see the backtest results of Welles's idea... Unfortunately, this is something that to me, seems quite random. Because yes, the system loses a bit, in the Covid period it had a leap down and then up, but I believe that this is a random equity line because what goes up goes down and vice versa. So we don't really find any particular edge in using the RSI as recommended by Welles.
Strategy with the RSI used as a filter
By the way, at the beginning of this video, I mentioned that we would also see another way of using the RSI. This way consists in using it not as a trigger, as the engine of our trading system, but as an operating filter. Let us now consider this other trading system, which is a little longer but absolutely not more complex than the one we have just seen.
Here we have only the Down Threshold input. We'll interpret the Up Threshold as 100 minus the Down Threshold, so if my input will be equal to 30, my Up Threshold will be 100 minus 30, so 70. Then we have a monetary stop loss of about $1,000.
In this script, I would like to draw your attention to these three lines. As you can see, we are going to calculate a simple 5-period moving average and a 200-period moving average on data2, which is a daily timeframe. After that, we will calculate the RSI over a short period of 2 days.
The strategy works with an intraday timeframe but its entry rules follow the trend of the chart of data2, that is, the daily bar chart. Here we see that EntryOk is equal to true only if the session has actually started, so if 'session last bar' of the previous bar is equal to true then we will make the entry. If EntryOK is true we'll buy the next bar at the low of the previous session - so the low of data2 - with a limit order only if the Close of data2 is greater than our Slow Moving Average, which is the 200-period moving average, and if the Close of data2 is less than the Fast Moving Average, that is the 5-day moving average.
Then we set a condition for the value of the RSI. This operation will be carried out only if the RSI is below a certain threshold. So, as Welles says, we will buy on low RSI values and sell if we are dealing with RSI values that are greater than a certain threshold. The same specular conditions are applied to the short side of the strategy.
We then have an exit condition. If the market position is actually long and the Close of data2, so the Close of the daily bar, exceeds the Fast Moving Average, then we will sell next bar at market. If, on the other hand, we are short and the Close is below the moving average, we will buy next bar at market.
This condition lets us enter the market only once per session. So if the market position has actually changed, that is, if an entry was made at this point, EntryOK will be equal to false and will only become true again at the beginning of a new session.
After that, we will specify the stop los. As we said, the stop loss is about $1000.
To which markets are we going to apply this strategy? We'll try to apply it to the future on the Standard & Poor 500 index, the Mini S&P 500. So let's start by evaluating what the strategy will do if we set the Down Threshold input equal to 100 and the stop loss input equal to 1000. Why 100 for the Down Threshold? We said that we will only trade if MyRSIValue is less than the Down Threshold, but we know very well that the RSI can only range from zero to 100, and this means that the RSI value will always be less than 100, so with this type of input it is like not having the filter at all. So we will start without any filter on the RSI value.
This strategy simply works with two moving averages, perhaps the most widely used ones, the 5-period and 200-period moving averages. So let's apply it to the Standard & Poor 500 future. Let's see the backseat performance from around 2008 to the present day. The equity line rises, although it is not optimal, especially at this point, and the average trade would be about $75 with about 550 trades.
Optimization and Results
Let's now see if there is a Down Threshold value that could help us filter the entries of the strategy to somehow improve its backtest performance. We can run a regular MultiCharts optimization for the Down Threshold input from 10 to 90, with steps of 10. As you can see, by using values around 20/30, so values similar to those recommended by Welles, the net profit and the average trade of the strategy increase.
So we see that even if we are actually cutting the number of the trades, we are keeping the most efficient ones, those that, on average, make the most profit. Let's try and take, say, 20 as a value, which is the solution that produces the highest profit in absolute terms. In this case, with just 300 trades instead of the 551 we have seen before, we have a $250 average trade and an equity line we can definitely call beautiful. And the reason why it is so beautiful is that we are using very few conditions. This strategy is in fact based on two moving averages and a limitation of the entries based on the RSI. That's all. With these conditions, we get 300 trades with very interesting profits and an average trade that exceeds $250. I’d say that this is really a great strategy!
Obviously, there are fewer short trades, and the reason is simply that there are much fewer cases in which the Close, and so the price, is less than the Slow Moving Average, which is the 200-period moving average.
Well guys, this was the RSI and some of its possible uses. We've seen that the classic approach doesn't work on any kind of underlying, but we still managed to use this oscillator as an operating filter, thus seeing that the theory behind the RSI can be still effective and so we can definitely use it in our systems. I leave to you the task of further exploring the potential of this indicator by applying it to different underlyings. If you liked the video I invite you to hit the "like" button and share it.
Finally, I'd like to remind you that in the description of this video you can find a link to a free webinar in which we give an introduction on how to build trading systems and create well-diversified portfolios of automated strategies. This is done by following the method of the 4-time World Trading Champion Andrea Unger. If you haven't done it yet, I invite you to subscribe to the channel and click on the bell so that you can stay updated on the release of the next videos. See you next time with other operational ideas and interesting concepts related to the world of systematic trading. Bye guys!
Need More Help? Book Your FREE Strategy Session With Our Team Today!
We’ll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.BOOK YOUR FREE STRATEGY SESSION NOW >>
Andrea Unger here and I help retail traders to improve their trading, scientifically. I went from being a cog in the machine in a multinational company to the only 4-Time World Trading Champion in a little more than 10 years.
I've been a professional trader since 2001 and in 2008 I became World Champion using just 4 automated trading systems.
In 2015 I founded Unger Academy, where I teach my method of developing effecting trading strategies: a scientific, replicable and universal method, based on numbers and statistics, not hunches, which led me and my students to become Champions again and again.
Now I'm here to help you learn how to develop your own strategies, autonomously. This channel will help you improve your trading, know the markets better, and apply the scientific method to financial markets.
Becoming a trader is harder than you think, but if you have passion, will, and sufficient capital, you'll learn how to code and develop effective strategies, manage risk, and diversify a portfolio of trading systems to greatly improve your chances of becoming successful.