#同样的代码之前这样写技术指标绘图都能正常更新的,为什么这几天就不能了 from tqsdk import TqApi, TqAuth from tqsdk.ta import * api =TqApi(auth=TqAuth('账号','密码'),web_gui = True) symbol='CZCE.TA301' while True: klines = api.get_kline_serial(symbol, 60, 500) dma = DMA(klines, 10, 50, 10) # 在副图上显示DMA klines['ddd'] = dma.ddd klines['ddd.board'] = 'B2' klines['ddd.color'] = 'green' klines['ama'] = dma.ama klines['ama.board'] = 'B2' klines['ama.color'] = 'red' # 均线MA ma5 = MA(klines, 5) ma10 = MA(klines, 10) ma20 = MA(klines, 20) ma40 = MA(klines, 40) ma60 = MA(klines, 60) klines['ma5'] = ma5 klines['ma5.color'] = 'red' klines['ma10'] = ma10 klines['ma10.color'] = 'blue' klines['ma20'] = ma20 klines['ma20.color'] = 'green' klines['ma40'] = ma40 klines['ma40.color'] = '#FF00FF' klines['ma60'] = ma60 klines['ma60.color'] = 'gray' api.wait_update() #更新行情数据 <img src="https://www.shinnytech.com/wp-content/uploads/anspress-temp/e3e4581a114963ab95183083f800639fa707f744_4857.png" />
李思恒 已回答的问题 2022年8月10日