From ee4fef76064b8f90fb63df12d7616c9c515adef0 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 16 Dec 2024 16:38:10 +0800 Subject: [PATCH] xgap, autobuy: disable notify --- pkg/strategy/autobuy/strategy.go | 1 + pkg/strategy/xgap/strategy.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pkg/strategy/autobuy/strategy.go b/pkg/strategy/autobuy/strategy.go index bf76083c5b..196e67f9b7 100644 --- a/pkg/strategy/autobuy/strategy.go +++ b/pkg/strategy/autobuy/strategy.go @@ -113,6 +113,7 @@ func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) { func (s *Strategy) Run(ctx context.Context, _ bbgo.OrderExecutor, session *bbgo.ExchangeSession) error { s.Strategy.Initialize(ctx, s.Environment, session, s.Market, ID, s.InstanceID()) + s.Strategy.OrderExecutor.DisableNotify() if s.Bollinger != nil { s.boll = session.Indicators(s.Symbol).BOLL(s.Bollinger.IntervalWindow, s.Bollinger.BandWidth) diff --git a/pkg/strategy/xgap/strategy.go b/pkg/strategy/xgap/strategy.go index 070cd6d964..758bca2a05 100644 --- a/pkg/strategy/xgap/strategy.go +++ b/pkg/strategy/xgap/strategy.go @@ -151,6 +151,8 @@ func (s *Strategy) CrossRun(ctx context.Context, _ bbgo.OrderExecutionRouter, se } s.Strategy.Initialize(ctx, s.Environment, tradingSession, s.tradingMarket, ID, s.InstanceID()) + s.Strategy.OrderExecutor.DisableNotify() + s.FeeBudget.Initialize() s.stopC = make(chan struct{})