Closed brandonros closed 2 years ago
Almost all functions return arrays to enable further manipulation. Lets say you want a signal line of the RSI, you just take the output of the function and enter it in a moving average with a length.
rsi = await ta.rsi(rsi_data, rsi_length);
signal = await ta.sma(rsi, ma_length);
To retrieve the latest value get the last array element.
https://stackoverflow.com/questions/22626238/calculate-rsirelative-strength-index-using-some-programming-language-js-c
Should I just take 0th element?