Explorar o código

波动率恢复正常,允许开单

JiahengHe hai 1 ano
pai
achega
9744f9f1bb
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      strategy/src/core.rs

+ 4 - 0
strategy/src/core.rs

@@ -669,6 +669,10 @@ impl Core {
             // 更新波动率
             if self.trade_vec.len() > 99 {
                 self.calc_sigma();
+                // 波动率正常,但还是不开单信号,允许开单
+                if !self.is_sigma_abnormal && !self.is_sigma_allow_open {
+                    self.is_sigma_allow_open = true;
+                }
             }
             // 判断是否需要触发ontick 对行情进行过滤
             // 过滤条件 价格变化很大 时间间隔很长