1,在【研究】中创建文件,命名为【tradestat.py】
2,把楼主的【研究策略】中的第一格复制到【tradestat.py】,保存
3,把楼主的【研究策略】中的第二格复制到【克隆策略】,保存
4,编译运行
5,
2014-01-02 09:00:00 - ERROR - Traceback (most recent call last):
File "kuanke/user_space.py", line 146, in exec_msg
return getattr(self, func)(*msg['args'], **msg['kwargs'])
File "kuanke/user_space.py", line 228, in init_code
exec code_obj in code_scope
File "user_code.py", line 30, in
g.trade_stat.watch(context, stock)
NameError: name 'context' is not defined
@IT金融街道办250主任
我也是这个错,请问怎么解决的
Traceback (most recent call last):
File "kuanke/user_space.py", line 146, in exec_msg
return getattr(self, func)(*msg['args'], **msg['kwargs'])
File "kuanke/user_space.py", line 298, in initialize
self.func_initialize(self.user_context)
File "user_code.py", line 84, in initialize
g.trade_stat = tradestat.trade_stat()
AttributeError: 'module' object has no attribute 'trade_stat'