From 965fc6989d255299941337da99e2877783aea41a Mon Sep 17 00:00:00 2001 From: Lee Date: Thu, 13 Jan 2022 23:06:23 +0800 Subject: [PATCH] fix: Correct uptrendSkew and downtrendSkew parameters setting on bollmaker strategy --- pkg/strategy/bollmaker/strategy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/strategy/bollmaker/strategy.go b/pkg/strategy/bollmaker/strategy.go index 6802bd46b..9707d3696 100644 --- a/pkg/strategy/bollmaker/strategy.go +++ b/pkg/strategy/bollmaker/strategy.go @@ -329,13 +329,13 @@ func (s *Strategy) placeOrders(ctx context.Context, orderExecutor bbgo.OrderExec } } else if midPrice.Float64() > s.defaultBoll.LastDownBand() && midPrice.Float64() < s.neutralBoll.LastDownBand() { // downtrend, might bounce back - skew := 2.0 + skew := s.DowntrendSkew.Float64() ratio := 1.0 / skew sellOrder.Quantity = math.Max(s.market.MinQuantity, buyOrder.Quantity*ratio) } else if midPrice.Float64() < s.defaultBoll.LastUpBand() && midPrice.Float64() > s.neutralBoll.LastUpBand() { // uptrend, might bounce back - skew := 0.5 + skew := s.UptrendSkew.Float64() buyOrder.Quantity = math.Max(s.market.MinQuantity, sellOrder.Quantity*skew) } else if midPrice.Float64() < s.defaultBoll.LastDownBand() { // strong downtrend