Why Your RSI Doesn't Match TradingView (Wilder Smoothing)
Same pair, same timeframe, two different RSI readings. Smoothing method and warm-up history explain it, and the gap can be several points.

Your RSI alert fires at 30 on one platform while the other still shows 36. Neither screen is broken; they are running different calculations under the same name. The short answer: RSI is a formula plus a smoothing method plus a starting poi
Your RSI alert fires at 30 on one platform while the other still shows 36. Neither screen is broken; they are running different calculations under the same name.
The short answer: RSI is a formula plus a smoothing method plus a starting point, and platforms differ on the last two. TradingView uses Wilder's original smoothing, where each new average is (previous average × 13 + new value) / 14; some platforms use a plain 14-bar average instead, which can sit several points away on the same candles. Even two Wilder RSIs disagree if one had less history to warm up on, so compare the candles first, then compare bars far back in history to tell a method gap from a warm-up gap.
RSI is a ratio of two averages, and the averaging is the whole game
RSI (Relative Strength Index, a 0 to 100 oscillator that compares recent up-moves to recent down-moves) comes down to one line. StockCharts' ChartSchool gives it as "RS = Average Gain / Average Loss", then RSI = 100 minus 100 divided by (1 + RS). TradingView's RSI support page gives the same two lines.
Everything interesting hides in the word "average." There are at least two sensible ways to average the last 14 gains and 14 losses, and they do not agree.
Think of it as two ways to keep a running tab. One forgets everything older than 14 bars the moment it falls off the edge. The other never fully forgets: it keeps a fading memory of every bar since the start of the data.
Wilder's version has a memory that never fully ends
J. Welles Wilder introduced RSI in his 1978 book New Concepts in Technical Trading Systems, per StockCharts. The first average gain is the sum of the first 14 gains divided by 14. After that, each new value is [(previous Average Gain) x 13 + current Gain] / 14. Same for losses.
That is a smoothing technique that StockCharts compares to an exponential moving average. The weight on the newest bar is 1/14. A classic 14-period EMA (exponential moving average, which weights recent bars more heavily) puts 2/15 there. TA-Lib's documentation for the same smoothing, which it calls RMA, says it "reacts more slowly and gives noticeably more weight to old data."
TradingView's RSI page shows its own calculation using rma(gain, 14) and rma(loss, 14) and states the result is exactly equal to the built-in rsi(close, 14). So TradingView's RSI is Wilder's RSI.
One bar, worked through both ways
Start both versions from the same averages: average gain 0.50, average loss 0.40, so RS = 1.25 and RSI = 55.6. The new bar closes up 1.20.
- Wilder: average gain = (0.50 × 13 + 1.20) / 14 = 0.550; average loss = (0.40 × 13 + 0) / 14 = 0.371. RS = 1.48, RSI = 59.7.
- Plain 14-bar average, if the bar dropping out of the window was a +0.30 gain: average gain = 0.50 + (1.20 − 0.30) / 14 = 0.564; average loss stays 0.40. RSI = 58.5.
- Plain 14-bar average, if the bar dropping out was a −0.60 loss: average gain = 0.50 + 1.20 / 14 = 0.586; average loss = 0.40 − 0.60 / 14 = 0.357. RSI = 62.1.
Same new bar, same starting point, three readings. The plain average reacts to whatever happened fourteen bars ago leaving the window; Wilder's version does not have a window edge at all. That is the whole difference, repeated on every bar.
A platform that uses a plain average will drift away from Wilder
The other common way to build it is a simple moving average of the last 14 gains and 14 losses. It is a legitimate indicator. It is not Wilder's, and on the same candles it lands somewhere else.
How far? I ran both on 300 closes of a made-up random walk (a seeded series, 100 as the start, nothing from a real market). Treat this as an illustration of the mechanism from my own arithmetic, not a statistic about any instrument.
| Measure on the 300 synthetic closes | Result |
|---|---|
| Mean absolute gap, Wilder vs 14-bar simple average | 6.5 RSI points |
| Largest gap on any bar | 21.1 RSI points |
| Bars where one version was past a 70 or 30 line and the other was not | 30 of 286 |
| Last bar, Wilder / simple average | 48.95 / 50.71 |
Roughly one bar in ten disagreed about being overbought or oversold. If your rule is "act when RSI crosses 30," that is the difference between two different strategies, and a backtest on one platform tells you nothing certain about the other.
Does MetaTrader do this? I cannot tell you from the vendor's own documentation. The MetaTrader 5 help page gives RSI = 100 - (100 / (1 + U / D)) with U and D as "average number of positive price changes" and "average number of negative price changes," and does not say how those averages are computed. The MT4 page is just as quiet. Test it instead of guessing.
Warm-up history makes two Wilder RSIs disagree too
Even if both platforms use Wilder's formula, they can still differ, because Wilder's smoothing carries the starting value forward forever. TA-Lib puts it plainly: the same bar computed from an earlier start differs while the seed still carries weight, and that difference decays by a factor of 1 - 1/N per bar.
For N = 14 that factor is 13/14. My arithmetic: after 62 bars the seed's weight is about 1.0%, and after about 93 bars it is under 0.1%. StockCharts says its charts load at least 250 data points before the start date for this reason.
Same synthetic series, but the calculation started later, and I read the last bar each time:
| Bars of history the RSI had | RSI at the last bar |
|---|---|
| 300 | 48.95 |
| 100 | 48.97 |
| 40 | 47.71 |
| 20 | 43.03 |
With 100 bars the answer is within two hundredths. With 20 bars the reading is almost six points off. This is why a chart you just loaded with a few weeks of lower-timeframe data can show an RSI that the platform with years of history does not.
Candles and data can differ before the math even starts
RSI is only as consistent as the closes you feed it. Two platforms can slice the same market into different candles: a different daily close time, different session handling for indices, or different feeds for spot forex with their own quotes. I have not measured how much this moves RSI, and it will vary a lot by instrument. It is the first thing I rule out, because it takes thirty seconds: compare the OHLC of the same bar on both screens before you touch the indicator.
If you have ever wondered why a backtest and the live chart tell different stories, this is one of the cheaper causes to fix, since it needs no code.
A five-minute test to find out which gap you have
Put the same pair on the same timeframe on both platforms. Then work through the list.
- Match the candles. Compare open, high, low and close of three recent bars. If they differ, stop: the indicator is not the problem.
- Set both RSIs to length 14 on the close.
- Scroll back 500 bars on both and read the same historical bar. A gap that shrinks the further back you go points to warm-up. A gap that stays large everywhere points to a different averaging method.
- Read three or four bars, not one. One lucky match on a single bar proves nothing.
- Decide which version you trade, and write its method into your journal and your rule.
— TradokiA rule that says "RSI under 30" is incomplete. It needs a platform, a length, a source, a smoothing method and an amount of history. Everything else is a vibe.
The same smoothing sits inside other Wilder indicators
Wilder used the same smoothing in ATR and the directional-movement indicators, per TA-Lib's note that he introduced it as the smoothing inside RSI, ATR and the directional-movement family. So the mismatch is not an RSI quirk. If your ATR-based stop sizes change from platform to platform, the logic above applies, and the ATR multiplier post covers what that number was and was not built to do.
It also bites hardest on short lengths. A rule such as RSI(2), a favorite in the mean reversion setups retail courses recycle, leans heavily on the newest bar, so a different averaging method changes which bars qualify. Whether a given test has enough trades to trust is a separate question, and how many trades a backtest needs is where to start with that.
Your RSI number is a setting, so log it like one
I have a simple opinion on this. Indicators describe the past, and RSI describes it through a formula somebody chose. If your rule only works on one platform's version of that formula, you do not know yet whether you have found something or found a quirk. Test the rule on both versions. A rule that survives a change of smoothing is sturdier than one that does not.
Practice this on a demo account and keep the actual RSI value you saw next to each trade, the way the first 30 days on a demo account approach suggests. In a month you will know whether your readings are stable enough to build on.
For what it is worth, the RSI in Tradoki's Strategy Lab uses Wilder's method: a simple average of the first 14 changes, then the (previous × 13 + new) / 14 recursion, the same as TradingView. It is seeded from the first bars of the window you choose, so the warm-up point above applies: a 30-day test on daily bars gives RSI only about 30 bars to settle, while a 365-day window on daily bars, or any window on hourly bars, leaves the seed's influence negligible after the first hundred bars. The RSI and Momentum module covers the indicator itself.
● FAQ
- Why is my RSI different on TradingView and my broker's platform?
- Two things cause almost all of it. The platforms may average gains and losses differently (Wilder's smoothing versus a plain average), and they may start the calculation from a different amount of history. A large gap usually means a different method. A gap of a point or two usually means different warm-up history or different candles.
- Which RSI formula is the correct one?
- Wilder's original, which StockCharts documents as a first 14-period average followed by (previous average x 13 + current value) / 14. TradingView's built-in RSI uses the RMA function for the same job. A plain moving average version is a variant, not the original, and it will give different readings and different 70/30 crossings.
- How much chart history does RSI need to be accurate?
- More than people expect. StockCharts says its formula needs at least 250 data points to replicate its RSI numbers. As a rule of thumb from the math, the influence of the starting value on a 14-period Wilder RSI falls under 1% after about 62 bars and under 0.1% after about 93.
- Does the RSI on MetaTrader match TradingView?
- MetaTrader's help pages give the formula as 100 - 100 / (1 + U / D), with U and D as the average positive and negative price changes, but they do not say how those averages are computed. Do not assume a match. Put both charts on the same candles, compare three or four bars, and see whether the gap is constant or shrinks with more history.
- Should I change my RSI settings to match another platform?
- Only if you are comparing readings across platforms, for example when copying a rule from a course. Pick the platform where you will actually trade, backtest on that platform's own RSI, and write the exact method down in your journal so the rule means the same thing next month.
Three more from the log.

Bollinger Bands Settings: Is 20, 2 Right for 5-Min Charts?
Everyone runs Bollinger Bands at 20 and 2. Its inventor calls them defaults, and a simulation shows what 10 and 1.5 does to how often price pokes out.
Oct 27, 2026 · 7 min
Pine Script Limits: 64 Plots, 40 Requests, 500 ms Loops
Your script ran fine yesterday and now throws a limit error. Here are the Pine Script caps that bite traders: plots, request calls, loops, buffers, orders.
Nov 27, 2026 · 7 min
TradingView Strategy Fills at Next Bar Open, Not the Close
Pine strategies signal on the close but fill at the next open. See what process_orders_on_close changes and why 'On order fill' fakes exact-high exits.
Nov 21, 2026 · 7 min