mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
bbgo: add notification tag
This commit is contained in:
parent
c2eec1e72b
commit
33fdcefba3
|
@ -66,13 +66,13 @@ func (s *CumulatedVolumeTakeProfit) Bind(session *ExchangeSession, orderExecutor
|
|||
}
|
||||
|
||||
if cqv.Compare(s.MinQuoteVolume) > 0 {
|
||||
Notify("%s TakeProfit triggered by cumulated volume (window: %d) %f > %f, price = %f",
|
||||
Notify("[CumulatedVolumeTakeProfit] %s TakeProfit triggered by cumulated volume (window: %d) %f > %f, price = %f",
|
||||
position.Symbol,
|
||||
s.Window,
|
||||
cqv.Float64(),
|
||||
s.MinQuoteVolume.Float64(), kline.Close.Float64())
|
||||
|
||||
if err := orderExecutor.ClosePosition(context.Background(), fixedpoint.One, "cumulatedVolumeTakeProfit") ; err != nil {
|
||||
if err := orderExecutor.ClosePosition(context.Background(), fixedpoint.One, "cumulatedVolumeTakeProfit"); err != nil {
|
||||
log.WithError(err).Errorf("close position error")
|
||||
}
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue
Block a user