Search This Blog
A practical journal on algorithmic trading, market analysis, and building automated systems. Written by an independent developer and active trader.
Featured
- Get link
- X
- Other Apps
When Two Charts Read RSI 71 and 62 on the Same Bar of Data
A reading of 70 on a relative strength index is not a fact about a market. It is the output of a function that takes five inputs, only one of which is the market. Change any of the other four and the number moves while the price series stays exactly where it was.
That is not a complaint about the indicator. It is a description of how it was defined. The trouble starts when the number travels without the settings attached — in a screenshot, a chat room, a strategy description, a backtest writeup — as though RSI 70 identified a condition the way “the 10-year closed at 4.69” identifies a condition. It does not, and the size of the gap between those two kinds of statement can be measured rather than argued about.
What follows measures it on one public series, using the original definition, with the arithmetic shown.
The part of the calculation that never changes
RSI was introduced by J. Welles Wilder in New Concepts in Technical Trading Systems (1978, ISBN 0-89459-027-8), and presented the same year in the June 1978 issue of Commodities. The formula itself is short and is not in dispute:
RSI = 100 − 100 / (1 + RS)RS = average gain / average loss, measured over the lastnbars
Wilder also specified how those two averages are maintained. They are not plain averages of the last n values. Each new bar updates them recursively:
new average = (previous average × (n − 1) + newest value) / n- seeded with a simple average of the first
nvalues in the series
That recursion is equivalent to an exponentially weighted average with a smoothing factor of 1/n, and it has consequences that show up later in this post. The commonly quoted defaults sit on top of it rather than inside it. TradingView's documentation, for example, gives a default length of 14 bars and a default source of the close, and describes the 70 and 30 levels as Wilder's own framing, while noting that traders often substitute 80 and 20. Fidelity's indicator guide states the same formula and calls 70 and 30 traditional rather than binding.
So the fixed part is one equation. Everything else is a setting.
One series, three lookback lengths
The series used here is the U.S. Treasury Daily Treasury Par Yield Curve Rates, 10-year constant maturity, published by the Department of the Treasury. The window is 2 January 2026 through 20 August 2026: 160 daily observations, ranging from a low of 3.97% on 27 February to a high of 4.75% on 31 July.
A rate series rather than an equity price is a deliberate choice here. RSI is scale-free — it only ever sees first differences — so nothing about the arithmetic depends on the units. Using a series published daily by a federal agency means every number below can be reproduced from the source without a data vendor in the way.
Three Wilder-smoothed RSI series were computed on those same 160 closes, with lookbacks of 7, 14 and 21. Comparisons are made over the 139 sessions from 3 February to 20 August, the window in which all three are defined.
| Setting | Range over the window | Sessions at 70 or above | Sessions at 30 or below |
| RSI(7), Wilder | 19.2 to 85.3 | 17 | 8 |
| RSI(14), Wilder | 29.7 to 74.8 | 3 | 1 |
| RSI(21), Wilder | 35.2 to 69.5 | 0 | 0 |
The bottom row is the one worth sitting with. Over the identical 139 sessions of the identical series, a 21-period RSI never once reached 70 and never once reached 30. A 7-period RSI on the same data stood at or beyond one of those lines on 25 of the same 139 sessions. Neither is wrong. They are answers to different questions that happen to share a name and a y-axis.
Two individual sessions make the point concrete:
- 24 July 2026: RSI(7) printed 71.3; RSI(21) printed 62.2. One is above the conventional line and one is comfortably below it, on the same bar.
- 13 February 2026: RSI(7) printed 19.2; RSI(21) printed 37.8. That 18.6-point spread is the widest of the window.
Across the window, RSI(7) and RSI(21) disagreed about whether the reading stood at 70 or above on 17 of 139 sessions, roughly one session in eight.
Same lookback, different smoothing
Lookback length is the setting most people know they are choosing. Smoothing method is the one most people do not know exists.
A widely used variant, generally credited to Cutler, replaces Wilder's recursion with a plain simple moving average of the up and down moves. Cutler's stated reason was not aesthetic: because Wilder's smoothing carries a decaying but never-vanishing tail, the value of Wilder's RSI depends on where in the data file the calculation began — a property he named data length dependency. The simple average has no such tail.
Both variants were computed on the same 160 closes with the same lookback of 14. The only difference between them is the averaging step. Over the same 139-session window:
- The difference between them ranged from −17.5 points (19 March) to +22.9 points (9 June).
- They differed by 5 points or more on 66 of 139 sessions, and by 10 points or more on 20 sessions.
- On 9 June 2026, the Wilder version read 56.2 — unremarkable middle of the range — while the simple-average version read 33.3, a few points off its lower band.
- On the final session, 20 August 2026, with the yield at 4.69%, the Wilder version read 54.0 and the simple-average version read 44.8.
- The simple-average version reached 70 or above on 18 sessions against 3 for Wilder, and 30 or below on 8 against 1. The two disagreed about the 70 line on 15 sessions and about the 30 line on 7.
Both of those are "RSI(14)". Both are computed from the same closes. Neither is a misconfiguration.
Why the first bar leaves a residue
Cutler's objection can be quantified directly from Wilder's recursion. With a smoothing factor of 1/n, the weight assigned to each successive older bar decays by a factor of (1 − 1/n) and never reaches zero. Three consequences follow arithmetically:
- The newest bar carries
1/nof the weight: 14.3% at n = 7, 7.1% at n = 14, 4.8% at n = 21. - The most recent
nbars — the ones the setting appears to name — carry only 66.0%, 64.6% and 64.1% of the total weight respectively. This converges to1 − 1/e, about 63.2%, as n grows. - Reaching 90% of the total weight takes 15 bars at n = 7, 31 bars at n = 14, and 47 bars at n = 21.
The effect is visible in the same Treasury series. Holding the lookback at 14 and the end date at 20 August 2026, and varying only the bar on which the calculation was started:
- Started from 2 January 2026 (160 sessions of history): 53.98
- Started from 25 June 2026 (40 sessions of history): 55.53
- Started from 24 July 2026 (20 sessions of history): 50.29
Across all 141 start bars tested, the 20 August reading ranged from 49.23 to 56.20 — a spread of 6.98 points produced by nothing but the choice of where to begin. The convergence is fast, though: once roughly 60 sessions of history preceded the reading, every start bar produced 53.98 give or take 0.02. That is the practical form of the rule — the tail matters until it does not, and for a 14-period setting it stops mattering somewhere around four times the lookback.
What this does and does not establish
It does not establish that RSI is broken, and nothing here argues for or against any threshold having predictive value. That question is downstream of this one.
What it does establish is narrower and harder to dodge. RSI contains no information that is not already in the close series it was computed from; it is a bounded re-expression of the same first differences. So when two people compare RSI readings, they are not comparing observations of a market. They are comparing the outputs of two functions that may or may not be the same function. If the configuration is not stated, there is no way to know which.
The same applies to any written record. A backtest that reports entries taken when "RSI dropped below 30" has not described a rule that another person can rerun, because on this series the condition “30 or below” was met on 8 sessions, 1 session, 0 sessions or 8 sessions depending only on the lookback and smoothing chosen. The result is not wrong. It is simply not reproducible, which for a research record is the more serious defect.
What Would Invalidate This
Several conditions narrow or remove the problem entirely:
- The settings are stated. If a reading arrives as "RSI(14), Wilder smoothing, daily closes, TradingView", it is a reproducible measurement and none of the above applies to it. The argument is about unlabelled numbers, not about the indicator.
- A single trader on a single fixed configuration. Internal consistency is preserved regardless of which configuration was chosen. The exposure is limited to communicating with others and to reproducing past work.
- The magnitudes here are series-specific. The 18.6-point spread and the 22.9-point smoothing gap are properties of this series over this window, not constants. On a smoother, more strongly trending series the variants sit closer together; on a noisier one, further apart. Anyone quoting those two numbers as general facts about RSI would be repeating the exact error this post describes.
- Degenerate stretches compress the differences. Where a series has a long unbroken run in one direction, average loss approaches zero, RS grows without bound, and every variant pins near 100 or near 0 together. The disagreement lives in ordinary two-sided price action.
- This is a daily rate series, not a traded price. The Treasury par yield curve is published once per session and is derived from a curve fit, not from a tape. The arithmetic transfers unchanged to tick or minute bars, but the specific values do not, and on intraday bars the choice of session boundaries adds a sixth setting.
- Warm-up ceases to matter with enough history. The start-bar spread above collapses once about four times the lookback has elapsed. A chart with years of loaded history is not exposed to it; a freshly seeded calculation on a short file is.
Concrete Framework
A short checklist that removes the ambiguity without changing anyone's method:
- Write the configuration as one line before quoting any reading. Bar interval, price field, lookback
n, smoothing method, platform. If that line cannot be written, the reading should not be quoted. - Find out which smoothing your platform uses. Check the documentation or the indicator source. A platform that exposes a moving-average-type option is telling you the answer is not fixed.
- Reproduce one value by hand. Take 20 closes, compute RSI(14) both ways from the formulas above, and see which one matches your chart to the decimal. It takes a few minutes once and settles the question permanently.
- Give the calculation warm-up. For Wilder smoothing, load at least 4n bars before the first reading you intend to rely on — about 56 bars for a 14-period setting, which matched the observed convergence point on this series.
- Compare configurations before comparing numbers. When someone else's reading disagrees with yours, the first hypothesis is different settings, not different markets.
- Record the configuration in the research log, next to the result. A backtest line that reads "RSI(14) Wilder, daily close, 60-bar warm-up" is reproducible. One that reads "RSI below 30" is a note to self.
- Treat a threshold as a property of your configuration. If RSI(21) on your series has never printed 70 in seven months, a rule written around 70 is not a strict rule on that configuration — it is an unreachable one, and that is worth knowing before it is coded rather than after.
The indicator is doing exactly what Wilder specified in 1978. The number it returns is a joint function of the market and four decisions, and only one of those two things gets mentioned when the number is quoted.
- Get link
- X
- Other Apps
Popular Posts
Trading Value vs. Market Cap — What the Numbers Actually Tell You About Who's Driving the Market
- Get link
- X
- Other Apps
The Hidden Flaw in a 25-Step Grid — Why Losses Exploded in Later Stages
- Get link
- X
- Other Apps
Comments
Post a Comment