|
@@ -222,7 +222,7 @@ impl Predictor {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
profit_now -= dec!(0.001);
|
|
profit_now -= dec!(0.001);
|
|
|
- profit_now.rescale(4);
|
|
|
|
|
|
|
+ profit_now.rescale(8);
|
|
|
|
|
|
|
|
self.profit_point_vec.push(profit_now);
|
|
self.profit_point_vec.push(profit_now);
|
|
|
|
|
|
|
@@ -512,7 +512,7 @@ impl Predictor {
|
|
|
let prev_profit_point = self.profit_point_vec[self.profit_point_vec.len() - 2];
|
|
let prev_profit_point = self.profit_point_vec[self.profit_point_vec.len() - 2];
|
|
|
let profit_point = self.profit_point_vec[self.profit_point_vec.len() - 1];
|
|
let profit_point = self.profit_point_vec[self.profit_point_vec.len() - 1];
|
|
|
|
|
|
|
|
- if prev_profit_point > Decimal::ZERO && profit_point < Decimal::ZERO {
|
|
|
|
|
|
|
+ if (prev_profit_point >= Decimal::ZERO && profit_point < Decimal::ZERO) || (prev_profit_point > Decimal::ZERO && profit_point <= Decimal::ZERO) {
|
|
|
self.fair_rate_focus_close = dec!(-0.12);
|
|
self.fair_rate_focus_close = dec!(-0.12);
|
|
|
self.fair_price_focus_close = self.mid_price;
|
|
self.fair_price_focus_close = self.mid_price;
|
|
|
|
|
|