xalign: add more info to the notification

This commit is contained in:
c9s 2024-11-04 16:08:52 +08:00
parent 8e5bb1b6e4
commit 634ded1759
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -515,7 +515,11 @@ func (s *Strategy) align(ctx context.Context, sessions map[string]*bbgo.Exchange
if selectedSession != nil && submitOrder != nil { if selectedSession != nil && submitOrder != nil {
log.Infof("placing %s order on %s: %+v", submitOrder.Symbol, selectedSession.Name, submitOrder) log.Infof("placing %s order on %s: %+v", submitOrder.Symbol, selectedSession.Name, submitOrder)
bbgo.Notify("Aligning %s position on exchange session %s, delta: %f", currency, selectedSession.Name, q.Float64(), submitOrder) bbgo.Notify("Aligning %s position on exchange session %s, delta: %f %s, expected balance: %f %s",
currency, selectedSession.Name,
q.Float64(), currency,
expectedBalance.Float64(), currency,
submitOrder)
if s.DryRun { if s.DryRun {
return return