fix talib bug on bollinger bands and other indicators when working on small assets, rise talib prescision and add test associated
This commit is contained in:
15
freqtrade/tests/test_talib.py
Normal file
15
freqtrade/tests/test_talib.py
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
import talib.abstract as ta
|
||||
import pandas as pd
|
||||
|
||||
def test_talib_bollingerbands_near_zero_values():
|
||||
inputs = pd.DataFrame([
|
||||
{'close': 0.00000010},
|
||||
{'close': 0.00000011},
|
||||
{'close': 0.00000012},
|
||||
{'close': 0.00000013},
|
||||
{'close': 0.00000014}
|
||||
])
|
||||
bollinger = ta.BBANDS(inputs, matype=0, timeperiod=2)
|
||||
assert (bollinger['upperband'][3] != bollinger['middleband'][3])
|
Reference in New Issue
Block a user