RSI settings: what changing the length does

By Oalgo · Last reviewed

The main setting of RSI is its length, the number of candles it looks back over. Oalgo's builder starts at 14. A shorter length makes RSI swing wider and cross the 70 and 30 levels more often. A longer length makes it move less. The two levels are the other setting people change.

Chart: example prices, then below them the RSI with lengths 7, 14 and 21 on the same scale, with lines at the levels 70 and 30. The length 7 line swings the widest and the length 21 line the least.PriceRSI 7RSI 14RSI 217030
Example prices, made up for this page. Lengths 7, 14 and 21.

What settings does RSI have?

#
  • Length: how many candles the averages of up moves and down moves cover. 14 is the usual length and the one the builder starts at.
  • Levels: 70 and 30 are common markers. They are not part of the calculation, so a rule can use any numbers between 0 and 100, such as 80 and 20.
  • The price it reads: RSI is calculated from the close of each candle.

What does a different length change?

#

The table uses the 120 candles of the example prices. RSI with length 7 has a value from candle 7, length 14 from candle 14 and length 21 from candle 21.

RSI lengthLowest valueHighest valueCandles with a value
712.191.0114
1426.078.1107
2134.270.4100

A shorter length reaches further towards 0 and 100. Next, how often each length crossed the usual levels. A cross above 70 means the candle before was at 70 or lower and this one is above it. A cross below 30 is the same the other way round.

RSI lengthCandles above 70Crossed above 70Candles below 30Crossed below 30
7247 times224 times
14133 times93 times
2111 time00 times

Length 21 never fell below 30 on these prices, so a rule that waits for that would never have started here. Length 7 crossed above 70 seven times.

What does moving the levels change?

#

Levels change how often a rule acts too. This table keeps the length at 14 and moves the levels.

Levels (upper, lower)Candles above upperCrossed above upperCandles below lowerCrossed below lower
80 and 2000 times00 times
70 and 30133 times93 times
60 and 40385 times317 times

With 80 and 20, RSI with length 14 never reached either level on these prices.

How do people use RSI settings in rules?

#
  • Start from 14 with 70 and 30, then change one setting at a time and test each version on past prices.
  • A shorter length with wider levels, such as 7 with 80 and 20, to ask for a larger move before the rule acts. On the example prices, length 7 was above 80 on 14 candles and below 20 on 12.
  • A longer length with closer levels, such as 21 with 60 and 40, because a longer RSI moves less. On the example prices, length 21 was above 60 on 30 candles and below 40 on 19.
  • The same rule on a different timeframe, because the length counts candles, not hours.

What can RSI settings not tell you?

#

No setting suits every market or every period. A length that fits one stretch of prices can do little on another, and trying many settings until one looks good is how a rule becomes overfitted. Change one thing at a time, test on more than one date range with a backtest, and read the number of trades before the end result.

In Oalgo you can tell Oalgo AI your RSI rule, with the length and levels you want, 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.

Read next