代码:
………
# 获取SYMBOL1合约的10秒K线
klines = api.get_kline_serial(SYMBOL1, 1)
………
# 技术指标 ——————————————————————————————————————–
HH = tafunc.hhv(klines.high, N) # 求N个周期最高价, 即N周期高点(包含当前k线)
#print(” ||| HH1 = “,HH[N],” H2 = “,HH[N+1],” H3 = “,HH[N+2],” H4 = “,HH[N+3],” H5 = “,HH[N+4],” H6 = “,HH[N+5])
print(” ||| HHV = “,list(HHV))
结果:
“2020/01/07-10:02:58″,” ||| HHV = [nan, nan, nan, nan, nan, nan, nan, nan, nan, 2349.0, 2349.0, 2349.0, 2349.0, 2349.0, 2349.0, 2349.0, 2349.0, 2349.0, 2349.0, 2349.0, 2349.0, 2349.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2351.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 2352.0, 235″
请问:hhv()结果哪个是当前的最高价,或者说如何取得1分钟K线图10周期的最高价?