3.55K 浏览
0

File “C:/TianQin/strategies/singlema_tdtphama.py”, line 1833, in tdtphama_2
print(“nn.iloc[-1+i ]:”,nn.iloc[-1+i])
UnboundLocalError: local variable ‘nn’ referenced before assignment

我是用异步函数写的,单独运行一个品种不报错,运行多个就报错了

mm = tafunc.ref(HAhigh, 1) - tafunc.ref(HAlow, 1)
                    nn = tafunc.ma(mm, 6)

ringo 已回答的问题 2020年6月5日
0

全局变量和局部变量的问题,可以百度下解决

ringo 已回答的问题 2020年6月5日