From 9af58b07ec166f1e433e1edc259430b7e542be60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=82=8B=E3=81=BF?= Date: Tue, 13 Sep 2022 23:35:29 +0800 Subject: [PATCH] fix market error --- pkg/strategy/marketcap/strategy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/strategy/marketcap/strategy.go b/pkg/strategy/marketcap/strategy.go index bf809e98b..122aac5b3 100644 --- a/pkg/strategy/marketcap/strategy.go +++ b/pkg/strategy/marketcap/strategy.go @@ -116,6 +116,9 @@ func (s *Strategy) generateSubmitOrders(ctx context.Context, session *bbgo.Excha currentWeights := marketValues.Normalize() for currency, targetWeight := range targetWeights { + if currency == s.BaseCurrency { + continue + } symbol := currency + s.BaseCurrency currentWeight := currentWeights[currency] currentPrice := prices[currency]