在BarGenerator中update_tick函数里:
elif self.bar:
self.bar.high_price = max(self.bar.high_price, tick.last_price)
if self.last_tick and tick.high_price > self.last_tick.high_price:
self.bar.high_price = max(self.bar.high_price, tick.high_price)
这里面为什么self.bar.high_price要和tick.last_price进行比较呢,因为high_price正常情况下一定是等于tick.high_price的,是否可以直接改成
elif self.bar:
self.bar.high_price = max(self.bar.high_price, tick.high_price)