anandanand84/technicalindicators

StochasticRSI documentation

rakirox opened this issue · 1 comments

there is a missing documentation of StochasticRSI, I was wondering if it works? or if can someone explain me the correct usage and input set?

024N commented

You can use like that.
const closeValueList = [
632.97, 629.68, 631.54, 633.5,
635.08, 632.96, 632.55, 628.95,
631.12, 629.1, 626.97, 623.6,
626.95, 623.8, 625.9, 630.37,
629.11, 625.1, 621.47, 614.03,
618.17, 623.19, 618.12, 616.94,
619.97, 619.07, 620.47, 624.3,
623.79, 623.68, 627, 627.83,
627.19 ]

const inputStochasticRSI = {
values: closeValueList, // your last 33 close values are used here
rsiPeriod: 14,
stochasticPeriod: 14,
kPeriod: 3,
dPeriod: 3,
};

const stochRSIResponse = StochasticRSI.calculate(inputStochasticRSI);

Its response is different from tradingview response. I don't know why?