1

I am looking to manually calculate RSI in JS using an upwards and downwards movement arrays

let upArr = [*upwards movement data series]

let downArr = [*downwards movement data series]

In order to achieve something like this

let rsi = 100 - 100 / (1 + upArr / downArr)

EDIT

Solution I ended up using,

var rsi1 = upArr.map((a, i) => a / downArr[i]);

var rsi2 = rsi1.map((a, i) => a + 1);

var rsi3 = rsi2.map((a, i) => 100 / a);

var rsi = rsi3.map((a, i) => 100 - a);
  • Does this answer your question? [Calculate RSI(Relative Strength Index) using some programming language (JS/C#..)](https://stackoverflow.com/questions/22626238/calculate-rsirelative-strength-index-using-some-programming-language-js-c) – Sund'er Aug 08 '22 at 04:36
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 08 '22 at 05:57

0 Answers0