You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the first price in series is the smallest one, the RSI indicator will always have a value of 1.0.
This happens when the rest of the price is bigger than the first price. RSI has to be brand new (has_inputs==False)
Expected Behavior
Indicator should have values < 1.0 eventually.
Actual Behavior
Indicator have values equal to 1.0.
Steps to Reproduce the Problem
Feed indicator with series with the smallest price at the beginning.
Code Snippets or Logs
Maybe _last_value should be assigned in (rsi.pyx:102):
if self._average_loss.value == 0:
self.value = self._rsi_max
return
Workaround that works for me:
if self.rsi.value == 1.0 and not self.rsi.initialized:
self.invalid_rsi_counter += 1
if self.invalid_rsi_counter > 5:
self.rsi.reset()
self.invalid_rsi_counter = 0
Specifications
OS platform: Windows
Python version: 3.12
nautilus_trader version: 1.218.0a20250516
The text was updated successfully, but these errors were encountered:
cjdsellers
changed the title
Relative Strength Index (RSI) Indicator always equal to 1.0
Relative Strength Index (RSI) Indicator always equal to 1.0 when inputs greater than initial
May 28, 2025
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
If the first price in series is the smallest one, the RSI indicator will always have a value of 1.0.
This happens when the rest of the price is bigger than the first price. RSI has to be brand new (
has_inputs==False
)Expected Behavior
Indicator should have values < 1.0 eventually.
Actual Behavior
Indicator have values equal to 1.0.
Steps to Reproduce the Problem
Feed indicator with series with the smallest price at the beginning.
Code Snippets or Logs
Maybe
_last_value
should be assigned in (rsi.pyx:102):Workaround that works for me:
Specifications
nautilus_trader
version: 1.218.0a20250516The text was updated successfully, but these errors were encountered: