龚成明 2 роки тому
батько
коміт
4a907cceeb
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      scripts/one-pro.js

+ 2 - 2
scripts/one-pro.js

@@ -20,15 +20,15 @@ const orderHandler = function(context, task) {
         // 止盈逻辑
         const isStopWin = token.BinancePrice > (token.orderPrice * (100 + Config.stopWinPercentage) / 100)
         if (isStopWin) {
+          fileLogger.info(`[止盈]${pair}, price: ${token.orderPrice}->${token.BinancePrice}, amount: ${token.orderAmount}.`)
           token.orderPrice = undefined
-          fileLogger.info(`[止盈]${pair}, price: ${token.orderPrice}, amount: ${token.orderAmount}.`)
         }
       } else {
         // 止损逻辑
         const isStopLoss = token.BinancePrice < (token.orderPrice * (100 - Config.stopLossPercentage) / 100)
         if (isStopLoss) {
+          fileLogger.info(`[止损]${pair}, price: ${token.orderPrice}->${token.BinancePrice}, amount: ${token.orderAmount}.`)
           token.orderPrice = undefined
-          fileLogger.info(`[止损]${pair}, price: ${token.orderPrice}, amount: ${token.orderAmount}.`)
         }
       }
     } else if (token.isLong) {