From fb96756460fb316154327199e9cecef5b3bde2a6 Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 17 Oct 2024 13:13:45 +0800 Subject: [PATCH] xmaker: reset position started time when hedge order is submitted --- pkg/strategy/xmaker/strategy.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/strategy/xmaker/strategy.go b/pkg/strategy/xmaker/strategy.go index 86cf55ec4..2b94a9034 100644 --- a/pkg/strategy/xmaker/strategy.go +++ b/pkg/strategy/xmaker/strategy.go @@ -1297,6 +1297,8 @@ func (s *Strategy) Hedge(ctx context.Context, pos fixedpoint.Value) { } else { s.coveredPosition.Add(quantity.Neg()) } + + s.resetPositionStartTime() } func (s *Strategy) tradeRecover(ctx context.Context) {