skyffire hai 10 meses
pai
achega
ddd10e8b6d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      strategy/src/predictor.rs

+ 2 - 2
strategy/src/predictor.rs

@@ -222,7 +222,7 @@ impl Predictor {
                 };
 
                 profit_now -= dec!(0.001);
-                profit_now.rescale(4);
+                profit_now.rescale(8);
 
                 self.profit_point_vec.push(profit_now);
 
@@ -512,7 +512,7 @@ impl Predictor {
                 let prev_profit_point = self.profit_point_vec[self.profit_point_vec.len() - 2];
                 let profit_point = self.profit_point_vec[self.profit_point_vec.len() - 1];
 
-                if prev_profit_point > Decimal::ZERO && profit_point < Decimal::ZERO {
+                if (prev_profit_point >= Decimal::ZERO && profit_point < Decimal::ZERO) || (prev_profit_point > Decimal::ZERO && profit_point <= Decimal::ZERO) {
                     self.fair_rate_focus_close = dec!(-0.12);
                     self.fair_price_focus_close = self.mid_price;