from tqsdk import TqApi, TqSim
from tqsdk.ta import BBI, ATR
api = TqApi(TqSim())
klines = api.get_kline_serial(“CFFEX.IF1911”, 24 * 60 * 60, data_length=30)
bbi = BBI(klines, 3, 6, 12, 24)
print(list(bbi[“bbi”]))
结果为:
[nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]
west 已回答的问题 2019年10月30日