fixed heikinashi

This commit is contained in:
hroff-1902 2019-05-06 00:30:21 +03:00
parent 66c2bdd65a
commit 2200a0223b
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ def heikinashi(bars):
bars['low'] + bars['close']) / 4
# ha open
bars.loc[:1, 'ha_open'] = (bars['open'] + bars['close']) / 2
bars.loc[0:1, 'ha_open'] = (bars['open'].values[0] + bars['close'].values[0]) / 2
prev_open = bars[:1]['ha_open'].values[0]
for idx, _ in bars[1:][['ha_open', 'ha_close']].iterrows():
loc = bars.index.get_loc(idx)