mirror of
https://github.com/wassname/pandas-ta.git
synced 2026-09-12 12:40:39 +08:00
Indexed using .iloc
Changed line 55 to use '.iloc' for indexing
This commit is contained in:
@@ -52,7 +52,7 @@ def ha(
|
||||
})
|
||||
|
||||
for i in range(1, m):
|
||||
df["HA_open"][i] = 0.5 * (df["HA_open"][i - 1] + df["HA_close"][i - 1])
|
||||
df["HA_open"].iloc[i] = 0.5 * (df["HA_open"].iloc[i - 1] + df["HA_close"].iloc[i - 1])
|
||||
|
||||
df["HA_high"] = df[["HA_open", "HA_high", "HA_close"]].max(axis=1)
|
||||
df["HA_low"] = df[["HA_open", "HA_low", "HA_close"]].min(axis=1)
|
||||
|
||||
Reference in New Issue
Block a user