Relative Strength Index (RSI): Formula, Signals, and What Tests Reveal

A blue RSI curve stays above a dashed 70 level, with the persistent stretch highlighted in amber.

Key takeaways

  • RSI compares smoothed gains with losses on a 0–100 scale; high readings can persist because flat closes do not automatically pull it toward 50.
  • Read the lookback together with the thresholds: longer memory and more distant levels jointly shape how often a rule can act.
  • Waiting for a recovery crossing can change timing and returns without reducing transactions; the historical comparisons found no consistent advantage from confirmation.

The Relative Strength Index (RSI) compares recent price gains with recent price losses and expresses their balance on a scale from 0 to 100. Traders commonly use a 14-period RSI, with readings above 70 called overbought and readings below 30 called oversold.

Those labels describe momentum. Buying while RSI is below 30 and buying after it recovers above 30 ask for different events. Across 313,632 valid historical configuration evaluations, we examined how RSI settings and trading rules interact. We will start with the calculation, then explore the behavior behind the familiar signals.

How RSI is calculated

RSI uses an average of upward price changes and an average of downward price changes, with losses expressed as positive amounts:

RS = average gain ÷ average loss
RSI = 100 − 100 ÷ (1 + RS)

Average gain = 2, average loss = 1
RS = 2
RSI ≈ 66.7

The usual calculation uses Wilder’s smoothing. After the initial averages, each update keeps part of the previous average and adds the latest change. For a 14-period RSI:

New average gain = (13 × previous average gain + latest gain) ÷ 14
New average loss = (13 × previous average loss + latest loss) ÷ 14

An upward close contributes a gain and a zero loss; a downward close contributes a loss and a zero gain. The averages retain some influence from older changes, so RSI 14 has a different kind of memory from a simple average containing exactly 14 observations. TradingView’s RSI guide covers the indicator and its calculation.

The period follows the chart. RSI 14 on a daily chart updates from daily closes; on a two-hour chart, it updates from two-hour closes. The familiar number 14 therefore describes different market time on different charts.

Why a flat price does not automatically cool RSI

Suppose price closes unchanged. The latest gain and loss are both zero. In the calculation above, both existing averages are multiplied by 13/14.

Their ratio stays the same, so RSI stays the same. With established, nonzero averages, a flat candle does not pull the oscillator toward 50 merely because time has passed.

This helps explain why a high reading can persist. RSI measures the balance of gains and losses under its smoothing rule. A move back down through 70 requires that balance to change.

How traders read RSI signals

Several familiar interpretations appear in Fidelity’s RSI guide:

  • Overbought and oversold: 70 and 30 mark customary momentum extremes. A strong trend can keep RSI near an extreme for an extended period.
  • The midpoint: above 50, the smoothed gains exceed the smoothed losses; below 50, losses exceed gains. This supplies trend context.
  • Recovery crossings: a rule can wait for RSI to cross back above an oversold level before buying, or back below an overbought level before selling. Schwab’s explanation discusses waiting for this return crossing.
  • Divergence: price can make a higher high while RSI makes a lower high, or a lower low while RSI makes a higher low. Traders use this difference as a possible warning about momentum. Our mechanical tests below focus on levels and crossings; they do not test divergence.

“RSI is below 30” describes a state that can last several candles. “RSI has crossed back above 30” describes a transition after that state. The distinction matters when turning a chart interpretation into an entry or exit rule.

Overbought can persist while price advances

The price panel appears above RSI 14. Move the shared inspection slider to compare the same candle in both panels.

Historical indicator values Price advances while RSI stays high

Price can keep rising while RSI remains overbought. Drag the shared inspection slider to compare the same candle in both panes.

The value table below is available without JavaScript.

Chart data
Data and calculation details
Source: Binance Spot BTCUSDT · two-hour candles. Official checksum-verified monthly candles; RSI 14 recalculated with Wilder smoothing from January 2024 prehistory. Candle-open timestamps label values calculated at that candle close. This selected episode contains no recorded executions.
Accessible value table (92 observations)
ObservationClosing price · CloseRSI 14 · RSI 14
2025-09-28T08:00:00Z109,519.42046.604
2025-09-28T10:00:00Z109,369.02044.060
2025-09-28T12:00:00Z109,639.00049.400
2025-09-28T14:00:00Z110,037.93056.072
2025-09-28T16:00:00Z110,203.52058.517
2025-09-28T18:00:00Z110,337.60060.438
2025-09-28T20:00:00Z110,833.99066.602
2025-09-28T22:00:00Z112,163.95076.960
2025-09-29T00:00:00Z111,855.30071.424
2025-09-29T02:00:00Z111,857.51071.440
2025-09-29T04:00:00Z111,753.34069.484
2025-09-29T06:00:00Z111,865.95070.427
2025-09-29T08:00:00Z112,110.90072.422
2025-09-29T10:00:00Z112,100.00072.188
2025-09-29T12:00:00Z113,227.29079.534
2025-09-29T14:00:00Z113,815.57082.179
2025-09-29T16:00:00Z114,043.91083.092
2025-09-29T18:00:00Z114,265.55083.952
2025-09-29T20:00:00Z114,176.73082.149
2025-09-29T22:00:00Z114,311.96082.756
2025-09-30T00:00:00Z114,500.31083.593
2025-09-30T02:00:00Z114,376.39080.814
2025-09-30T04:00:00Z113,904.00071.107
2025-09-30T06:00:00Z113,699.23067.332
2025-09-30T08:00:00Z112,781.97053.603
2025-09-30T10:00:00Z113,055.01056.450
2025-09-30T12:00:00Z113,404.53059.846
2025-09-30T14:00:00Z113,106.16055.842
2025-09-30T16:00:00Z113,246.11057.286
2025-09-30T18:00:00Z114,359.99066.634
2025-09-30T20:00:00Z114,161.00063.942
2025-09-30T22:00:00Z114,048.93062.412
2025-10-01T00:00:00Z114,549.99066.294
2025-10-01T02:00:00Z114,176.92061.224
2025-10-01T04:00:00Z114,569.84064.319
2025-10-01T06:00:00Z114,539.02063.888
2025-10-01T08:00:00Z116,412.10074.893
2025-10-01T10:00:00Z116,789.58076.451
2025-10-01T12:00:00Z116,806.96076.523
2025-10-01T14:00:00Z117,423.73078.986
2025-10-01T16:00:00Z116,768.07070.517
2025-10-01T18:00:00Z117,439.53073.635
2025-10-01T20:00:00Z117,554.96074.141
2025-10-01T22:00:00Z118,594.99078.202
2025-10-02T00:00:00Z118,617.37078.281
2025-10-02T02:00:00Z118,733.99078.714
2025-10-02T04:00:00Z118,377.34073.863
2025-10-02T06:00:00Z118,489.76074.398
2025-10-02T08:00:00Z118,849.99076.089
2025-10-02T10:00:00Z118,765.73074.844
2025-10-02T12:00:00Z119,621.20078.662
2025-10-02T14:00:00Z119,910.78079.781
2025-10-02T16:00:00Z119,917.52079.807
2025-10-02T18:00:00Z120,836.49083.070
2025-10-02T20:00:00Z120,150.10073.516
2025-10-02T22:00:00Z120,529.35075.212
2025-10-03T00:00:00Z119,875.72067.220
2025-10-03T02:00:00Z120,225.89069.114
2025-10-03T04:00:00Z119,920.40065.556
2025-10-03T06:00:00Z119,640.21062.384
2025-10-03T08:00:00Z120,300.00066.495
2025-10-03T10:00:00Z120,334.50066.700
2025-10-03T12:00:00Z120,374.73066.954
2025-10-03T14:00:00Z122,258.05076.128
2025-10-03T16:00:00Z122,073.25073.958
2025-10-03T18:00:00Z122,660.99076.274
2025-10-03T20:00:00Z122,306.57072.110
2025-10-03T22:00:00Z122,232.00071.228
2025-10-04T00:00:00Z121,865.21066.898
2025-10-04T02:00:00Z122,243.99068.994
2025-10-04T04:00:00Z122,522.70070.476
2025-10-04T06:00:00Z122,324.08067.983
2025-10-04T08:00:00Z122,208.78066.512
2025-10-04T10:00:00Z121,973.26063.490
2025-10-04T12:00:00Z122,385.42066.370
2025-10-04T14:00:00Z121,791.31059.130
2025-10-04T16:00:00Z121,747.37058.620
2025-10-04T18:00:00Z121,959.25060.392
2025-10-04T20:00:00Z122,190.67062.291
2025-10-04T22:00:00Z122,391.00063.904
2025-10-05T00:00:00Z122,377.72063.710
2025-10-05T02:00:00Z123,776.22073.025
2025-10-05T04:00:00Z125,127.99078.713
2025-10-05T06:00:00Z124,713.63073.591
2025-10-05T08:00:00Z123,020.50057.208
2025-10-05T10:00:00Z123,464.64059.740
2025-10-05T12:00:00Z123,161.39057.249
2025-10-05T14:00:00Z122,803.17054.366
2025-10-05T16:00:00Z123,057.05056.055
2025-10-05T18:00:00Z122,591.79052.239
2025-10-05T20:00:00Z122,729.99053.257
2025-10-05T22:00:00Z123,482.31058.449

RSI remained above 70 for 20 consecutive closes in the highlighted stretch, while price ended higher. The high reading described sustained upward momentum throughout that episode.

We selected a long stretch above 70 to make persistence visible. It illustrates how a high reading can last; it does not estimate how long the next one will continue. The chart shows calculated indicator values without trade markers. Exact source and selection details are folded below.

Waiting for a crossing changes timing

A common exit sells when RSI rises above 70. Another waits until RSI crosses back below 70. The second rule allows an overbought stretch to continue, but that extra time can help or hurt.

We compared these exits after the same recovery entry: RSI crosses above the lower level and remains at or below the upper level. Every other setting stays fixed. One execution means one buy or one sell.

In one historical dataset, 3,651 of 3,701 matched pairs recorded the same execution count when both rules had at least one buy and one sell. Their returns still differed. The same broad pattern appeared across all eight historical datasets: at least 97% of these active pairs had matching counts. Changing when a position closes can alter its outcome without reducing the number of transactions.

Waiting for the downward crossing improved some historical results and worsened others. Confirmation changes the timing of a trade; it did not supply a consistent advantage across the tested comparisons.

Read the lookback together with the levels

Longer RSI periods smooth changes more heavily. Whether that produces a quiet trading rule also depends on how far its thresholds sit from 50.

For a rule that buys below the lower level and sells above the upper level, one historical sample produced 91 executions with 30/70 levels and 275 with 40/60, using RSI 14 in both cases. The lookback stayed the same; moving the decision levels closer to 50 changed how often the rule could act.

Recorded backtest metrics RSI length and threshold distance shape activity

Keep the entry and exit levels fixed while changing only RSI length. The 40/60 levels sit closer to the middle than 30/70.

The value table below is available without JavaScript.

Chart data
Data and calculation details
This view selects a representative example; the chart-data download retains the full comparison. Source: TrainBard · unchanged RSI level-entry rules. Display shows lengths 7–100 for legibility; the full tested grid is 2–100. Each point is a complete-window exported backtest or a zero-trade tuple restored only after full UI reconciliation. An execution is an individual buy or sell. Compare changes within a panel; the windows have different durations.
Accessible value table (94 observations)
ObservationRecorded executions · 30/70 levelsRecorded executions · 40/60 levels
7309.000672.000
8251.000550.000
9213.000455.000
10177.000407.000
11139.000373.000
12113.000349.000
1399.000309.000
1491.000275.000
1579.000255.000
1673.000235.000
1765.000209.000
1863.000193.000
1957.000181.000
2055.000165.000
2145.000149.000
2239.000141.000
2335.000129.000
2431.000123.000
2529.000113.000
2629.000103.000
2729.00099.000
2827.00093.000
2924.00081.000
3022.00081.000
3120.00079.000
3218.00075.000
3316.00071.000
3416.00071.000
3516.00068.000
3616.00066.000
3712.00066.000
3810.00064.000
3910.00063.000
4010.00063.000
4110.00059.000
4210.00057.000
4310.00053.000
448.00051.000
458.00047.000
468.00045.000
478.00045.000
488.00042.000
498.00042.000
508.00038.000
516.00038.000
526.00038.000
536.00036.000
546.00036.000
556.00034.000
566.00032.000
576.00032.000
586.00030.000
596.00030.000
606.00030.000
616.00028.000
626.00028.000
636.00026.000
646.00026.000
656.00026.000
666.00026.000
676.00026.000
684.00024.000
694.00024.000
704.00024.000
714.00024.000
724.00024.000
734.00022.000
744.00020.000
754.00020.000
764.00020.000
774.00020.000
784.00020.000
794.00020.000
804.00020.000
814.00020.000
824.00018.000
834.00018.000
844.00018.000
854.00016.000
864.00016.000
874.00016.000
884.00016.000
894.00016.000
904.00016.000
914.00014.000
924.00014.000
934.00014.000
942.00014.000
952.00014.000
962.00012.000
972.00012.000
982.00012.000
992.00012.000
1000.00012.000

The chart displays lengths 7–100 for legibility; the complete tested grid runs from 2 to 100. Each point holds the entry and exit levels fixed and changes RSI length. A longer lookback can make a distant threshold rare; bringing the levels toward the middle changes the opportunity set again. These observations do not imply that every one-period increase must reduce activity. Compare the two threshold choices at the same lookback; the only difference between them is the entry and exit levels.

Study design, execution assumptions, and reproducibility

The fixed grid spans Binance Spot BTCUSDT and ETHUSDT, two-hour and four-hour candles, and the exact UI windows 2021-01-01 to 2023-12-31 and 2024-01-01 to 2025-12-31. We explored the earlier window, then kept the grid and final script unchanged for the later window and Ethereum replication. These comparisons are retrospective, with no prospective or live validation.

The price/RSI worked example uses official Binance Spot BTCUSDT two-hour candles. We selected the longest consecutive RSI 14 > 70 stretch in the 2024–2025 dataset: 20 closes, with candle-open labels from 2025-10-01T08:00Z through 2025-10-02T22:00Z. RSI is separately calculated with Wilder smoothing from earlier candles; the source and calculation record preserves the selection method and source checksums. The neutral “Candle” labels in the interactive display map to unchanged timestamps in the chart data.

The activity chart foregrounds Sample 1; the complete chart-data download retains both samples. Sample 1 is BTCUSDT two-hour data from 2021-01-01 to 2023-12-31; Sample 2 is BTCUSDT two-hour data from 2024-01-01 to 2025-12-31. The samples have different durations. The 91-versus-275 example comes from Sample 1; the corresponding Sample 2 counts are 68 and 184. The 3,651-of-3,701 exit-pair comparison also comes from Sample 2. The all-eight-dataset coverage statement uses the same active-pair definition in every asset, candle size and window.

For completeness, the familiar RSI 14 with 30/70 levels produced these default-setting returns after the same recovery entry:

BTC two-hour windowExit above 70Exit crossing below 70Passive from the same startup
2021–202389 executions; −30.92%89 executions; −19.74%−10.95%
2024–202564 executions; +47.63%64 executions; +25.80%+82.55%

Waiting for the downward crossing improved this default rule’s earlier result and worsened its later result. Both versions lagged the startup-matched passive comparison shown here.

RuleBuy conditionSell condition
LevelRSI below the lower levelRSI above the upper level
Recovery entryRSI crosses above the lower level, while at or below the upper levelRSI above the upper level
Recovery entry and exitSame recovery entryRSI crosses below the upper level
StrengthRSI above the upper levelRSI below the lower level

Each rule uses RSI lengths 2–100 in steps of 1, lower levels 5–50 in steps of 5, and upper levels 50–95 in steps of 5. The lower level must be below the upper level. Each frame therefore contains 39,204 valid configurations. The equal-level 50/50 tuples are invalid and remain separate from valid settings that make no trades. Across the eight frames, the completed main study contains 313,632 valid evaluations: 194,692 exported rows with trades and 118,940 valid settings without trades. The 3,168 invalid tuples are excluded from that count. All four joint batches completed with no exported error rows or duplicate parameter tuples.

Every test starts with 10,000 USDT, takes long positions using 99% of equity, and retains a 1% cash reserve. The requested combined fee and slippage is 0.1% per buy or sell execution. Signals use completed candles with next-open execution. Exits take priority; an entry requires a flat position. A common 500-bar startup inside each window prevents early orders, so the startup spans more calendar time on four-hour candles.

The passive comparison uses the same startup, sizing, cost, and next-open convention, then holds through the endpoint without a terminal sale. It is different from the platform’s full-window first-close-to-last-close benchmark. The UI end date includes the candle opening at 00:00 UTC on that date, rather than every candle in that calendar day.

A completed UI total and zero-trade count must reconcile the complete Cartesian grid before omitted valid tuples are counted as zero executions. Paired comparisons distinguish those inactive settings from pairs in which both rules record a buy and a sell. Related settings and overlapping market candles are not independent observations.

We also preserved small execution controls and an earlier full-allocation run outside the main count. A passive control showed that retaining cash avoided a delayed initial fill seen with 100% allocation. A recorded short-period exception still produced a small difference in execution counts between the two exit rules. The count findings describe the platform’s recorded results; they are not a mathematical guarantee that the rules execute identical cycles.

The exact tested Pine script, compact measurement and source record, and completed batch screenshot accompany the article. The measurement file includes all eight frame summaries, the complete 2–100 activity profiles for the two displayed threshold pairs, the separate passive baselines, and raw export checksums. Original exports and recorded diagnostic traces remain in the research archive.

These tests cover the stated crypto markets and chart intervals. Daily candles, other asset classes, divergence rules, short positions, leverage, and live execution remain outside this study.

For other ways to measure momentum, compare the Stochastic Oscillator and CCI. Related reading: simple moving averages, MACD, and Bollinger Bands.