mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
Precision for ta-lib 0.6.x was increased but is lower by 0001 than what was in the freqtrade ta-lib fix https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_utility.h#L257 This won't be a problem for any normal usdt pair. shitcoins on some exchanges (e.g gate) with 12 zeros before the first significant digit wouldn't have worked today, either.
17 lines
443 B
Python
17 lines
443 B
Python
import pandas as pd
|
|
import talib.abstract as ta
|
|
|
|
|
|
def test_talib_bollingerbands_near_zero_values():
|
|
inputs = pd.DataFrame(
|
|
[
|
|
{"close": 0.000010},
|
|
{"close": 0.000011},
|
|
{"close": 0.000012},
|
|
{"close": 0.000013},
|
|
{"close": 0.000014},
|
|
]
|
|
)
|
|
bollinger = ta.BBANDS(inputs, matype=0, timeperiod=2)
|
|
assert bollinger["upperband"][3] != bollinger["middleband"][3]
|