The RSI was created by Welles Wilder and many trading strategies have been designed around this indicator.  From trading oversold and overbought levels to trend determination via the 50 level, the RSI momentum indicator makes up the backbone of many different types of strategies. The Bloomberg trading terminal polled its users and the most used trading indicator was the RSI, the relative strength index.

Introduction

The RSI trading indicator is a measure of the relative strength of the market (compared to its history), a momentum oscillator and is often used as an overbought and oversold technical indicator. The RSI is displayed as a line graph that moves between two extremes from 0 to 100. The standard look-back period to calculate RSI is 14.

Traditional interpretation and usage of the RSI are that values of 70 or above indicate that a security is becoming overbought or overvalued and the price of the security is likely to go down in the future (bearish) while the RSI reading of 30 or below indicates an oversold or undervalued condition and the price of the security is likely to go up in the future (bullish).

On the other hand, a simple moving average (SMA) calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range which in our case will be 20. We will use a very simple determination for trend direction and that will come via the relationship between price and the moving average i.e. when the price is above the 20 SMA the market is in an uptrend while when the price is below the 20 SMA the market is in a downtrend.

Yellow line represents the 20-SMA wrt price while the blue line represents the RSI

How to use RSI with 20-SMA to generate Buy and Sell signals

The RSI look-back period should be set to 5 days and we are going to use the “50 level” for this strategy. The standard look-back period is 14 but by using 5 days, we will be able to take advantage of increased momentum sooner.

The purpose of the RSI in this trading strategy is to confirm the strength of the trend:

  • When the RSI peaks above the 50 level and starts to turn down, it indicates that the uptrend (or minor rally) is weakening and it is a good time to be looking to go short
  • When the RSI bottoms below the 50 level and starts to head up, it indicates that the downtrend (or minor pullback) may be weakening and it may be a good time to look for a trade entry signal to go long

Defining a ‘bullish scenario’ to generate a buy signal:

  1. Price has to be above the 20-SMA – indicating an uptrend.
  2. Wait for the price to pull back down to touch the 20 SMA line.
  3. Once the 20-SMA line is touched, look down to see if the 5-day RSI has bottomed below 50 RSI level and has started to turn up-confirming a weakening downward momentum.

Defining a ‘bearish scenario’ to generate a sell signal:

  1. Price has to be below the 20-SMA indicating a preceding downtrend.
  2. Wait for the price to rally back up to touch the 20-SMA line.
  3. Once the 20-SMA line is touched, look down to see if the 5-day RSI has peaked above the 50 level and has started to turn down-confirming a weakening upward momentum.
Look at the buy and the sell signal generated due to the strategy defined above

Building on Mudrex

RSI trading requires a lot of self-discipline. This is because you have to wait for the best trade signals. The Mudrex platform helps traders automate their trading and hence helps you execute your trading without the need to maintain this discipline!

You can create strategies on Mudrex using simple ‘blocks’. You can connect multiple blocks and define conditions on those connections or ‘paths’ to create your strategy on Mudrex.

As discussed above, lets first write our entry/exit conditions so that we know what to do:

Buy when:

  • Price crosses down 20-SMA
  • RSI crosses up 50

Sell when:

  • Price crosses up 20-SMA
  • RSI crosses down 50

Note: We won’t use Stop Loss or Take Profit so that we don’t miss out on up or down trends preceded by a consolidated price which might generate a false Stop Loss or Take Profit signal due to which we can lose the upcoming opportunity of selling using the above strategy.

To make the first buy condition on Mudrex, we’ll use a ‘compare’ block to compare the ‘Price’ and the 20-SMA line graph.

To make the second buy condition, we’ll use an ‘indicator’ block to generate a signal when RSI crosses up the threshold of 50.

You can then connect the compare and indicator blocks together with an ‘AND’ block.

Configuring the blocks for the Sell signal is left as an exercise to the reader. The Sell signal would look somewhat like this.

Overall the strategy looks like this:

Overall Strategy

There we go!

We can now run a quick back-test to see how our strategy performs. Running one from 28th Sep 2018 – 28th Mar 2020 using a tick cycle of 2H gives us pretty convincing results:

Back-test using a 2H tick cycle on Bitmex BTC/USD

The 20 SMA with RSI trading strategy in a trending market has the potential to add hundreds of pips to your count. This is especially true on higher time frames, two hour and above, as smaller time frames can change their trend direction more often.

A lot of even more complex things can be done on Mudrex!

Links

A few quick references below:

Happy Trading!