mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
remove diff quantity check
This commit is contained in:
parent
b59b42c3fa
commit
d730340b7a
|
@ -638,7 +638,7 @@ func (s *Strategy) reduceFuturesPosition(ctx context.Context) {
|
|||
if futuresBase.Compare(fixedpoint.Zero) < 0 {
|
||||
orderPrice := ticker.Buy
|
||||
orderQuantity := futuresBase.Abs()
|
||||
orderQuantity = fixedpoint.Max(orderQuantity, s.minQuantity)
|
||||
// orderQuantity = fixedpoint.Max(orderQuantity, s.minQuantity)
|
||||
orderQuantity = s.futuresMarket.AdjustQuantityByMinNotional(orderQuantity, orderPrice)
|
||||
if s.futuresMarket.IsDustQuantity(orderQuantity, orderPrice) {
|
||||
log.Infof("skip futures order with dust quantity %s, market = %+v", orderQuantity.String(), s.futuresMarket)
|
||||
|
@ -745,7 +745,8 @@ func (s *Strategy) syncFuturesPosition(ctx context.Context) {
|
|||
|
||||
log.Infof("position diff quantity: %s", diffQuantity.String())
|
||||
|
||||
orderQuantity := fixedpoint.Max(diffQuantity, s.minQuantity)
|
||||
orderQuantity := diffQuantity
|
||||
// orderQuantity := fixedpoint.Max(diffQuantity, s.minQuantity)
|
||||
orderQuantity = s.futuresMarket.AdjustQuantityByMinNotional(orderQuantity, orderPrice)
|
||||
if s.futuresMarket.IsDustQuantity(orderQuantity, orderPrice) {
|
||||
log.Warnf("unexpected dust quantity, skip futures order with dust quantity %s, market = %+v", orderQuantity.String(), s.futuresMarket)
|
||||
|
|
Loading…
Reference in New Issue
Block a user