diff --git a/pkg/strategy/dca2/openPosition.go b/pkg/strategy/dca2/openPosition.go index 10a09b4e1..f79a0c5ae 100644 --- a/pkg/strategy/dca2/openPosition.go +++ b/pkg/strategy/dca2/openPosition.go @@ -45,7 +45,6 @@ func getBestPriceUntilSuccess(ctx context.Context, ex types.Exchange, symbol str } func (s *Strategy) generateOpenPositionOrders(short bool, budget, price, priceDeviation fixedpoint.Value, maxOrderNum int64) ([]types.SubmitOrder, error) { - // TODO: not implement short part yet factor := fixedpoint.One.Sub(priceDeviation) if short { factor = fixedpoint.One.Add(priceDeviation) @@ -67,7 +66,7 @@ func (s *Strategy) generateOpenPositionOrders(short bool, budget, price, priceDe notional, orderNum := calculateNotionalAndNum(s.Market, short, budget, prices) if orderNum == 0 { - return nil, fmt.Errorf("failed to calculate DCA maker order notional and num, price: %s, budget: %s", price, budget) + return nil, fmt.Errorf("failed to calculate notional and num of open position orders, price: %s, budget: %s", price, budget) } var submitOrders []types.SubmitOrder diff --git a/pkg/strategy/dca2/openPosition_test.go b/pkg/strategy/dca2/openPosition_test.go index 4b7cc3cb9..ede4c9f31 100644 --- a/pkg/strategy/dca2/openPosition_test.go +++ b/pkg/strategy/dca2/openPosition_test.go @@ -39,7 +39,7 @@ func newTestStrategy(va ...string) *Strategy { return s } -func TestGenerateMakerOrder(t *testing.T) { +func TestGenerateOpenPositionOrders(t *testing.T) { assert := assert.New(t) strategy := newTestStrategy()