Jelajahi Sumber

RiskManager

- add `safe` option
Alexey Kim 2 bulan lalu
induk
melakukan
f12be07a6d
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      util/order.go

+ 2 - 2
util/order.go

@@ -38,8 +38,8 @@ func CreateOrder(
 	}
 
 	bid = sentio.ToFixed(quotes[symbol].BidPrice, 2)
-	tp = sentio.ToFixed(rm.TakeProfit(symbol, bid), 2)
-	sl = sentio.ToFixed(rm.StopLoss(symbol, bid), 2)
+	tp = sentio.ToFixed(rm.TakeProfit(symbol, bid, false), 2)
+	sl = sentio.ToFixed(rm.StopLoss(symbol, bid, false), 2)
 
 	// Prevent orders those have too small expected profit
 	if tp < bid+0.02 {