xmaker: reset position started time when hedge order is submitted

This commit is contained in:
c9s 2024-10-17 13:13:45 +08:00
parent 7f0b8f38d5
commit fb96756460
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -1297,6 +1297,8 @@ func (s *Strategy) Hedge(ctx context.Context, pos fixedpoint.Value) {
} else { } else {
s.coveredPosition.Add(quantity.Neg()) s.coveredPosition.Add(quantity.Neg())
} }
s.resetPositionStartTime()
} }
func (s *Strategy) tradeRecover(ctx context.Context) { func (s *Strategy) tradeRecover(ctx context.Context) {