crypto-trading-bot icon indicating copy to clipboard operation
crypto-trading-bot copied to clipboard

rsi with ema

Open algocode2022 opened this issue 3 years ago • 2 comments

how can i use moving average of rsi value;

thanks

algocode2022 avatar Aug 13 '22 23:08 algocode2022

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: @.***>

theFreedomFunds avatar Aug 14 '22 00:08 theFreedomFunds

what about as a array ?

algocode2022 avatar Aug 14 '22 16:08 algocode2022