Files
freqtrade/tests/test_talib.py
Matthias 3e3f092f0c test: reduce ta-lib test accuracy to align with ta-lib 0.6.5
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.
2025-08-14 09:59:07 +02:00

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]