rsi with ema
how can i use moving average of rsi value;
thanks
indicatorBuilder.add('rsi', 'rsi', options.period, { length: options.rsi_length });
const rsifull = indicatorPeriod.getIndicator('rsi');
const rsi = rsifull.slice(-1)[0];
const averaging_periods = options.rsi_avg_periods;
const rsi_arr = rsifull.slice(-averaging_periods); var sum_rsi = 0; for (let i = 0; i < rsi_arr.length; i++) { sum_rsi += rsi_arr[i]; }
const rsi_average = (sum_rsi / averaging_periods);
getOptions() { return { rsi_avg_periods: '14',
rsi_length: '14',
};
Sent from Proton Mail mobile
-------- Original Message -------- On Aug. 13, 2022, 19:15, Erol Mutlu < @.***> wrote:
how can i use moving average of rsi value;
thanks
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
what about as a array ?