technicalindicators
technicalindicators copied to clipboard
incorrect calculator RSI
hi i used rsi for calculator
const rsi = require('technicalindicators').RSI prices = [4261,4689,4400,6463,9837,13715,10285,10325] // first transaction from binance BTC var period = 3 var cal = rsi.calculate({period : period, values : prices})
when i comparison this number and rsi binance is very incorrect
code result : [ 89.6, 96.31, 98.26, 57.84, 58.14 ] //binance persent rsi period 3 from 2017/08/01 time frame 1 month 94,97,58,58,30
please help me
I am also getting completely different results compared to other online tools/brokers... UP.
Also different from tradingview.com RSI.
So is this indicator is not true reliable at all?
Indicator works. I have a database with over 4000 symbols with 20yrs+ data. I just checked my results against values in thinkorswim and are accurate to 1/100th.
@rlmomin thanks by your info. I was checking this library issues and I could see some questions about the indicators results. Of course there are people's mistakes or misunderstandings about how to check and interpret values so I was looking for responses like yours.
I think there are different views about the calculation rules. For tradingview.com RSI equivalence, I recreated RSI calc (AverageGain/AverageLoss) using WEMA (RMA). Something like: _rsi(x, y) => u = max(x - x[1], 0) // upward change d = max(x[1] - x, 0) // downward change rs = rma(u, y) / rma(d, y) res = 100 - 100 / (1 + rs) res
I think there are different views about the calculation rules. For tradingview.com RSI equivalence, I recreated RSI calc (AverageGain/AverageLoss) using WEMA (RMA). Something like: _rsi(x, y) => u = max(x - x[1], 0) // upward change d = max(x[1] - x, 0) // downward change rs = rma(u, y) / rma(d, y) res = 100 - 100 / (1 + rs) res
Hello, I was having the same issue as the OP and tried your method (using WEMA with rsiPeriod and EMA with 1/rsiPeriod. It provided me with the same result as the original RSI from this package. Do you have any idea?
Could someone send a PR to have this RSI like tradingview?
I think there are different views about the calculation rules. For tradingview.com RSI equivalence, I recreated RSI calc (AverageGain/AverageLoss) using WEMA (RMA). Something like: _rsi(x, y) => u = max(x - x[1], 0) // upward change d = max(x[1] - x, 0) // downward change rs = rma(u, y) / rma(d, y) res = 100 - 100 / (1 + rs) res
What's 'x' here? @oscarmoutinho
I don't see this working:
Inputs please! [Btw, I'm relatively new to this arena]
I've found that the RSI works when all the data are given at once meaning don't feed in only period+1 or limited data per se, just input the whole list of values and the RSI indicator precisely matches the values in TV, it just works beautifully.