|
|
@@ -503,7 +503,7 @@ impl Core {
|
|
|
// 更新策略时间
|
|
|
self.strategy.local_time = Utc::now().timestamp_millis();
|
|
|
// trace_stack.on_before_strategy();
|
|
|
- let mut order = self.strategy.do_strategy(&mut self.avellaneda_stoikov, &self.local_orders);
|
|
|
+ let mut order = self.strategy.do_strategy(&mut self.avellaneda_stoikov, &self.local_orders, &self.local_coin, &self.local_cash);
|
|
|
// trace_stack.on_after_strategy();
|
|
|
// 记录指令触发信息
|
|
|
if order.is_not_empty() {
|
|
|
@@ -637,7 +637,7 @@ impl Core {
|
|
|
self.strategy.local_time = Utc::now().timestamp_millis();
|
|
|
|
|
|
// 产生交易信号
|
|
|
- let mut orders = self.strategy.do_strategy(&mut self.avellaneda_stoikov, &self.local_orders);
|
|
|
+ let mut orders = self.strategy.do_strategy(&mut self.avellaneda_stoikov, &self.local_orders, &self.local_coin, &self.local_cash);
|
|
|
trace_stack.on_after_strategy();
|
|
|
|
|
|
if orders.is_not_empty() {
|