diff --git a/extensions/strategies/rsi/strategy.js b/extensions/strategies/rsi/strategy.js index 0107f122fe..04245efdf4 100644 --- a/extensions/strategies/rsi/strategy.js +++ b/extensions/strategies/rsi/strategy.js @@ -38,6 +38,10 @@ module.exports = { s.rsi_high = s.period.rsi } } + if (s.trend !== 'overbought' && s.trend !== 'short' && s.period.rsi >= s.options.overbought_rsi) { + s.rsi_high = s.period.rsi + s.trend = 'long' + } if (s.trend === 'long') { s.rsi_high = Math.max(s.rsi_high, s.period.rsi) if (s.period.rsi <= s.rsi_high / s.options.rsi_divisor) { @@ -67,6 +71,9 @@ module.exports = { if (s.period.rsi <= s.options.oversold_rsi) { color = 'green' } + if (s.period.rsi >= s.options.overbought_rsi) { + color = 'red' + } cols.push(z(4, n(s.period.rsi).format('0'), ' ')[color]) } return cols