Browse Source

算错了……

skyffire 8 months ago
parent
commit
64746e57b3
1 changed files with 2 additions and 2 deletions
  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