From 79b70d4a310cf1b74ab776440877b555aaa05329 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 8 Jul 2022 16:31:28 +0800 Subject: [PATCH 1/2] supertrend: fix interval window for exit methods --- pkg/strategy/supertrend/strategy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/strategy/supertrend/strategy.go b/pkg/strategy/supertrend/strategy.go index 91817d200..c3c7de45d 100644 --- a/pkg/strategy/supertrend/strategy.go +++ b/pkg/strategy/supertrend/strategy.go @@ -39,11 +39,11 @@ type Strategy struct { // Symbol is the market symbol you want to trade Symbol string `json:"symbol"` + types.IntervalWindow + // Double DEMA DoubleDema - // Interval is how long do you want to update your order price and quantity - Interval types.Interval `json:"interval"` // SuperTrend indicator // SuperTrend SuperTrend `json:"superTrend"` From 5bd292d0b2facecd6e932b4312600419098d845f Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 8 Jul 2022 16:43:32 +0800 Subject: [PATCH 2/2] bbgo: add notify(profit) --- pkg/bbgo/order_executor_general.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/bbgo/order_executor_general.go b/pkg/bbgo/order_executor_general.go index afc63cdb7..071e8e10f 100644 --- a/pkg/bbgo/order_executor_general.go +++ b/pkg/bbgo/order_executor_general.go @@ -66,6 +66,8 @@ func (e *GeneralOrderExecutor) BindProfitStats(profitStats *types.ProfitStats) { } profitStats.AddProfit(*profit) + + Notify(profit) Notify(profitStats) }) }