Commit 9bb0c5bf by zihan

参数调整

parent 90d98b29
......@@ -143,28 +143,10 @@ class BiboxStrategy3 extends Strategy3 {
_getMinMargin() {
return 0.08;
}
// _giveUpOrder(baseCurrency1, midCurrency, baseCurrency2, totalMarginRate, buyDepth, sellDepth) {
// if (sellDepth === 1) {
// const sellPrices = this.collector.getDepth(midCurrency, baseCurrency2, 2);
// const possibleLoss = (sellPrices[0][0] - sellPrices[1][0]) / sellPrices[0][0];
// // if(sellPrices[0][0] === this.lastPrice){
// // this.samePriceCount ++;
// // }else{
// // this.lastPrice = sellPrices[0][0];
// // this.samePriceCount = 0;
// // }
// const possibleLossMoney = (possibleLoss - totalMarginRate / 100) * sellPrices[1][0];
// if (possibleLossMoney > this.maxAllowLoss) {
// console.log(`此单风险过高,放弃。可能损失:${possibleLossMoney},${baseCurrency1}=>${midCurrency}=>${baseCurrency2}`);
// return true;
// }
// // if(possibleLoss*100-totalMarginRate > 3){
// // console.log(`此单风险过高,放弃。买一:${sellPrices[0][0]},买二:${sellPrices[1][0]},损失率${(possibleLoss * 100).toFixed(4)},利差:${totalMarginRate.toFixed(4)}`);
// // return true;
// // }
// }
_giveUpOrder(baseCurrency1, midCurrency, baseCurrency2, totalMarginRate, buyDepth, sellDepth) {
return buyDepth > sellDepth;
// return super._giveUpOrder(baseCurrency1, midCurrency, baseCurrency2, totalMarginRate, buyDepth, sellDepth);
// }
}
_logDelay() {
return true;
}
......
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