mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
fixed heikinashi
This commit is contained in:
parent
66c2bdd65a
commit
2200a0223b
2
freqtrade/vendor/qtpylib/indicators.py
vendored
2
freqtrade/vendor/qtpylib/indicators.py
vendored
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user