diff --git a/pyrobot/indicators.py b/pyrobot/indicators.py index 7f2e052..cde5c1b 100644 --- a/pyrobot/indicators.py +++ b/pyrobot/indicators.py @@ -281,7 +281,7 @@ def rsi(self, period: int, method: str = 'wilders', column_name: str = 'rsi') -> relative_strength_index = 100.0 - (100.0 / (1.0 + relative_strength)) # Add the info to the data frame. - self._frame['rsi'] = np.where(relative_strength_index == 0, 100, 100 - (100 / (1 + relative_strength_index))) + self._frame['rsi'] = np.where(relative_strength_index == 0, 100, 100.0 - (100.0 / (1.0 + relative_strength))) # Clean up before sending back. self._frame.drop(