def __init__(self, cta_engine, strategy_name, vt_symbol, setting):
""""""
super().__init__(cta_engine, strategy_name, vt_symbol, setting)
self.bg = BarGenerator(self.on_bar)
self.am = ArrayManager()
self.tick: TickData = None **_####这里加了这句_**
...
def on_bar(self, bar: BarData):
....
self.sell(self.tick.ask_price_1) **_###这里用了tick数据。_**
运行时报错:nonetype object has no attribute
改了很多遍都找不到问题在哪里。我Python太菜了,恳请大神帮个忙。