show kline in the notification

This commit is contained in:
c9s 2021-10-14 14:32:49 +08:00
parent fbbefe2878
commit e7fe443cbe

View File

@ -134,6 +134,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
prettyBaseVolume.FormatMoney(detection.MinVolume.Float64()), prettyBaseVolume.FormatMoney(detection.MinVolume.Float64()),
prettyQuoteVolume.FormatMoney(kline.QuoteVolume), prettyQuoteVolume.FormatMoney(kline.QuoteVolume),
) )
s.Notifiability.Notify(kline)
} else if detection.MinQuoteVolume > 0 && kline.QuoteVolume > detection.MinQuoteVolume.Float64() { } else if detection.MinQuoteVolume > 0 && kline.QuoteVolume > detection.MinQuoteVolume.Float64() {
s.Notifiability.Notify("Detected %s %s support quote volume %s > min quote volume %s, base volume %s", s.Notifiability.Notify("Detected %s %s support quote volume %s > min quote volume %s, base volume %s",
s.Symbol, detection.Interval, s.Symbol, detection.Interval,
@ -141,6 +142,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
prettyQuoteVolume.FormatMoney(detection.MinQuoteVolume.Float64()), prettyQuoteVolume.FormatMoney(detection.MinQuoteVolume.Float64()),
prettyBaseVolume.FormatMoney(kline.Volume), prettyBaseVolume.FormatMoney(kline.Volume),
) )
s.Notifiability.Notify(kline)
} }
} }
}) })