From 30be15dd3478b101488fd565490cdb8a20b6809d Mon Sep 17 00:00:00 2001 From: austin362667 Date: Thu, 2 Jun 2022 21:42:05 +0800 Subject: [PATCH] pivotshort: add repay margin side effect --- pkg/strategy/pivotshort/strategy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/strategy/pivotshort/strategy.go b/pkg/strategy/pivotshort/strategy.go index 249d36d55..4655f0f0e 100644 --- a/pkg/strategy/pivotshort/strategy.go +++ b/pkg/strategy/pivotshort/strategy.go @@ -114,6 +114,9 @@ func (s *Strategy) ClosePosition(ctx context.Context, percentage fixedpoint.Valu Quantity: quantity, Market: s.Market, } + if s.session.Margin { + submitOrder.MarginSideEffect = s.MarginOrderSideEffect + } //s.Notify("Submitting %s %s order to close position by %v", s.Symbol, side.String(), percentage, submitOrder)