From 9b8239abbafb501e0da4b48b2b7a6ba469d4b0f6 Mon Sep 17 00:00:00 2001 From: austin362667 Date: Sat, 4 Jun 2022 02:27:08 +0800 Subject: [PATCH] pivotshort: add symbol name --- pkg/strategy/pivotshort/strategy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/strategy/pivotshort/strategy.go b/pkg/strategy/pivotshort/strategy.go index c1b51560a..02b560544 100644 --- a/pkg/strategy/pivotshort/strategy.go +++ b/pkg/strategy/pivotshort/strategy.go @@ -263,7 +263,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se session.UserDataStream.OnStart(func() { if price, ok := session.LastPrice(s.Symbol); ok { limitPrice := s.getValidPivotLow(price) - log.Infof("init place limit sell start from %f adds up to %f percent with %f layers of orders", limitPrice.Float64(), s.Entry.CatBounceRatio.Mul(fixedpoint.NewFromInt(100)).Float64(), s.Entry.NumLayers.Float64()) + log.Infof("init %s place limit sell start from %f adds up to %f percent with %f layers of orders", s.Symbol, limitPrice.Float64(), s.Entry.CatBounceRatio.Mul(fixedpoint.NewFromInt(100)).Float64(), s.Entry.NumLayers.Float64()) s.placeLayerOrder(ctx, s.LastLow, limitPrice, price, orderExecutor) } }) @@ -307,7 +307,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se } limitPrice := s.getValidPivotLow(kline.Close) - log.Infof("place limit sell start from %f adds up to %f percent with %f layers of orders", limitPrice.Float64(), s.Entry.CatBounceRatio.Mul(fixedpoint.NewFromInt(100)).Float64(), s.Entry.NumLayers.Float64()) + log.Infof("%s place limit sell start from %f adds up to %f percent with %f layers of orders", s.Symbol, limitPrice.Float64(), s.Entry.CatBounceRatio.Mul(fixedpoint.NewFromInt(100)).Float64(), s.Entry.NumLayers.Float64()) s.placeLayerOrder(ctx, s.LastLow, limitPrice, kline.Close, orderExecutor) //s.placeOrder(ctx, lastLow.Mul(fixedpoint.One.Add(s.CatBounceRatio)), s.Quantity, orderExecutor) }