소스 검색

使用短周期的trades实验

skyffire 1 년 전
부모
커밋
b49a3bd2e3
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      strategy/src/avellaneda_stoikov.rs

+ 2 - 2
strategy/src/avellaneda_stoikov.rs

@@ -56,7 +56,7 @@ impl AvellanedaStoikov {
     // 时间窗口大小(微秒)
     const MAX_TIME_RANGE_MICROS: i64 = 3 * 60_000_000;
     const TRADE_LONG_RANGE_MICROS: i64 = 3 * 60_000_000;
-    const TRADE_SHORT_RANGE_MICROS: i64 = 20_000_000;
+    const TRADE_SHORT_RANGE_MICROS: i64 = 60_000_000;
     // const ONE_MILLION: Decimal = dec!(1_000_000);
     // const TWENTY_THOUSAND: Decimal = dec!(20_000);
     const IRA: Decimal = dec!(1);
@@ -459,7 +459,7 @@ impl AvellanedaStoikov {
         } else {
             Decimal::ZERO
         };
-        self.flow_ratio_trades = Self::calc_flow_ratio(&self.flow_ratio_trades, &dec!(0), &mut self.trade_long_vec);
+        self.flow_ratio_trades = Self::calc_flow_ratio(&self.flow_ratio_trades, &dec!(0), &mut self.trade_short_vec);
     }
 
     pub fn check_ready(&mut self) {