Skip to content

Commit

Permalink
ruff fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stash86 committed Aug 17, 2024
1 parent be5d355 commit 39972b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions technical/indicators/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def MADR(dataframe, length=21, stds=2, matype="sma"):
ma = ta.EMA(df, timeperiod=length)
else:
ma = ta.SMA(df, timeperiod=length)

df["rate"] = ((df["close"] / ma) * 100) - 100

if matype.lower() == "sma":
Expand All @@ -1070,7 +1070,7 @@ def MADR(dataframe, length=21, stds=2, matype="sma"):
df["stdcenter"] = ta.EMA(df.rate, timeperiod=(length * stds))
else:
df["stdcenter"] = ta.SMA(df.rate, timeperiod=(length * stds))

std = ta.STDDEV(df.rate, timeperiod=(length * stds))
df["plusdev"] = df["stdcenter"] + (std * stds)
df["minusdev"] = df["stdcenter"] - (std * stds)
Expand Down

0 comments on commit 39972b7

Please sign in to comment.