|
|
@@ -249,8 +249,8 @@ impl AvellanedaStoikov {
|
|
|
}
|
|
|
|
|
|
pub fn update_optimal_ask_and_bid(&mut self) {
|
|
|
- self.optimal_ask_price = max(self.ref_price + self.ask_delta, self.ask_price);
|
|
|
- self.optimal_bid_price = min(self.ref_price - self.bid_delta, self.bid_price);
|
|
|
+ self.optimal_ask_price = max(self.ref_price + self.ask_delta / Decimal::TWO, self.ask_price);
|
|
|
+ self.optimal_bid_price = min(self.ref_price - self.bid_delta / Decimal::TWO, self.bid_price);
|
|
|
}
|
|
|
|
|
|
pub fn update_t_diff(&mut self) {
|