Parcourir la source

RiskManager

- add `safe` option
Alexey Kim il y a 2 mois
Parent
commit
f12be07a6d
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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 {