Selaa lähdekoodia

撤销刚刚的提交,还是要绝对值

skyffire 7 kuukautta sitten
vanhempi
commit
4591af7f03
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/trend14400.rs

+ 1 - 1
src/trend14400.rs

@@ -29,7 +29,7 @@ pub fn generate_14400trend_by_records(records: &Vec<Record>) -> Indicators {
         // 计算比率
         let trend = records.last().unwrap().close / mean;
 
-        indicators.trend_strength = trend - Decimal::ONE;
+        indicators.trend_strength = (trend - Decimal::ONE).abs();
         indicators.trend_strength.rescale(6);
     }