|
|
@@ -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) {
|