Commit ad7e5447 by zihan

bug fixed

parent 6804ef3a
...@@ -50,22 +50,17 @@ class Strategy3 { ...@@ -50,22 +50,17 @@ class Strategy3 {
let amount = result[7]; let amount = result[7];
let returnAmount = result[8]; let returnAmount = result[8];
// console.log({buyRemark, sellRemark, returnRemark}); // console.log({buyRemark, sellRemark, returnRemark});
const sellSymbol = this.collector.getSymbol(midCurrency, baseCurrency2);
const sellDelay = endTime - this.collector.getSymbolEventTime(sellSymbol); const sellDelay = endTime - this.collector.getSymbolEventTime(sellSymbol);
if(this._logDelay()){ if(this._logDelay()){
const buySymbol = this.collector.getSymbol(baseCurrency1, midCurrency); const buySymbol = this.collector.getSymbol(baseCurrency1, midCurrency);
const sellSymbol = this.collector.getSymbol(midCurrency, baseCurrency2);
const buyDelay = endTime - this.collector.getSymbolEventTime(buySymbol); const buyDelay = endTime - this.collector.getSymbolEventTime(buySymbol);
console.log('买入交易对延迟:' + buyDelay + " 卖出交易对延迟:" + sellDelay); console.log('买入交易对延迟:' + buyDelay + " 卖出交易对延迟:" + sellDelay);
// if(buyDelay> 5000 || sellDelay > 5000){
// console.log('延时过大,放弃该轮交易');
// return false;
// }
} }
if(sellDelay > 5000){ if(sellDelay > 5000){
console.log('延时过大,放弃该轮交易'); console.log('延时过大,放弃该轮交易');
return false; return false;
} }
const service = this.service; const service = this.service;
let savedRecord = null; let savedRecord = null;
const finishedOrders = []; const finishedOrders = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment