Browse Source

算错了……

skyffire 8 tháng trước cách đây
mục cha
commit
64746e57b3
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      strategy/src/predictor.rs

+ 2 - 2
strategy/src/predictor.rs

@@ -206,11 +206,11 @@ impl Predictor {
 
                 // 在下跌
                 if max - last > last - min {
-                    (last - max) / max - Decimal::ONE
+                    (last - max) / max
                 }
                 // 在上涨
                 else {
-                    (last - min) / min - Decimal::ONE
+                    (last - min) / min
                 }
             } else {
                 Decimal::ZERO