Commit ce9e3a87 by rongjun

bug

parent 50cffa9d
...@@ -239,17 +239,16 @@ class BaseCollector { ...@@ -239,17 +239,16 @@ class BaseCollector {
runStrategy3(){ runStrategy3(){
console.log("启动成功"); console.log("启动成功");
this.allowTrade = true setInterval(()=>{
// setInterval(()=>{ redisClient.get(this.machine + "_STOP", (err, value) => {
// redisClient.get(this.machine + "_STOP", (err, value) => { if (value) {
// if (value) { this.allowTrade = false;
// this.allowTrade = false; console.log("滑点过多,停止交易");
// console.log("滑点过多,停止交易"); } else {
// } else { this.allowTrade = true;
// this.allowTrade = true; }
// } });
// }); },1000 *10);
// },1000 *10);
this._runMonitor((data)=>{ this._runMonitor((data)=>{
if(data){ if(data){
this.balanceMap = {...data}; this.balanceMap = {...data};
......
...@@ -138,7 +138,7 @@ class BiboxStrategy3 extends Strategy3 { ...@@ -138,7 +138,7 @@ class BiboxStrategy3 extends Strategy3 {
} }
_getMinTradeInterval() { _getMinTradeInterval() {
return 1000; return 10000;
} }
_getMinMargin() { _getMinMargin() {
......
...@@ -56,7 +56,7 @@ class Strategy3 { ...@@ -56,7 +56,7 @@ class Strategy3 {
const buyDelay = endTime - this.collector.getSymbolEventTime(buySymbol); const buyDelay = endTime - this.collector.getSymbolEventTime(buySymbol);
const sellDelay = endTime - this.collector.getSymbolEventTime(sellSymbol); const sellDelay = endTime - this.collector.getSymbolEventTime(sellSymbol);
console.log('买入交易对延迟:' + buyDelay + " 卖出交易对延迟:" + sellDelay); console.log('买入交易对延迟:' + buyDelay + " 卖出交易对延迟:" + sellDelay);
if(sellDelay > 3000){ if(sellDelay > 5000){
console.log('延时过大,放弃该轮交易'); console.log('延时过大,放弃该轮交易');
return false; return false;
} }
......
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