Java: Home made RSI based on ticker.getLastPrice()

Hello, I’ve made an RSI14 indicator based on getLastPrice() .

I compare 14 of prices to do step 1 of the RSI calculation, then step 2 for each row afterward.

However it oscillates wildly. I was hoping to have an indicator very like the trading view one but mine can go from 1 to 99 in a few seconds.

The period between captures is 1 second, so I’m comparing data over 14 seconds however the problem is the same regardless of the time period. I’ve tried over 14 minutes too.

Has anyone got an RSI14 that operates the same as trading view?

RSI calculate on closed price of last N timeFrames. Example RSI14 is 13 closed HOURLY (or dayly) candles and current price as 14th.
You every time get ticker.getLastPrice() and your timeFrame is 1 second ? I think it is mistake

But I try get RSI as Binance and fault every time
My graph identically visual, but sometime min-max points too much different from binance
Also i calc Bolinger band - and i got ideal numbers as Binance only if add coefficient 0.975… i dont know why Binance make it

Yes - i got it!
Please see description with “Example Calculation” Relative Strength Index Technical Analysis Indicator: rsi - Tulip Indicators