|
|
@@ -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) {
|