|
|
@@ -956,7 +956,7 @@ impl Strategy {
|
|
|
// target_buy_price = utils::clip(target_buy_price, self.bp * dec!(0.97), self.ap * dec!(1.0005));
|
|
|
target_buy_price = utils::fix_price(target_buy_price, self.tick_size);
|
|
|
let amount = if predictor.inventory <= dec!(-3) {
|
|
|
- utils::get_amount_by_min_amount_value(self.min_amount_value * (predictor.inventory.abs() - dec!(2)), target_buy_price, self.step_size)
|
|
|
+ utils::get_amount_by_min_amount_value(self.min_amount_value * predictor.inventory.abs(), target_buy_price, self.step_size)
|
|
|
} else {
|
|
|
utils::get_amount_by_min_amount_value(self.min_amount_value, target_buy_price, self.step_size)
|
|
|
};
|
|
|
@@ -997,7 +997,7 @@ impl Strategy {
|
|
|
// 取消大小限制
|
|
|
target_sell_price = utils::fix_price(target_sell_price, self.tick_size);
|
|
|
let amount = if predictor.inventory >= dec!(3) {
|
|
|
- utils::get_amount_by_min_amount_value(self.min_amount_value * (predictor.inventory.abs() - dec!(2)), target_sell_price, self.step_size)
|
|
|
+ utils::get_amount_by_min_amount_value(self.min_amount_value * predictor.inventory.abs(), target_sell_price, self.step_size)
|
|
|
} else {
|
|
|
utils::get_amount_by_min_amount_value(self.min_amount_value, target_sell_price, self.step_size)
|
|
|
};
|