# 计算10根K线总的最大波动spread
self.max_ = self.am.high[-10:].max()
self.min_ = self.am.low[-10:].min()
self.spread = self.am.high[-10:].max() - self.am.low[-13:-1].min()
# 计算前9根K线,每一根K线的最大波动都不超过spread的0.5倍
high_ = bar.high_price
low_ = bar.low_price
self.spread_3 = self.am.high_ - self.am.low_ - self.spread * 0.5
(self.spread_3 < 0).iloc[:10].sum == 9