mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
FIX: [xalign] verify LargetAmountAlert is not nil
This commit is contained in:
parent
b57c54de2b
commit
44ca46cbf2
|
@ -593,6 +593,7 @@ func (s *Strategy) align(ctx context.Context, sessions map[string]*bbgo.Exchange
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.LargeAmountAlert != nil {
|
||||||
if price, ok := s.priceResolver.ResolvePrice(currency, s.LargeAmountAlert.QuoteCurrency); ok {
|
if price, ok := s.priceResolver.ResolvePrice(currency, s.LargeAmountAlert.QuoteCurrency); ok {
|
||||||
quantity := q.Abs()
|
quantity := q.Abs()
|
||||||
amount := price.Mul(quantity)
|
amount := price.Mul(quantity)
|
||||||
|
@ -616,6 +617,7 @@ func (s *Strategy) align(ctx context.Context, sessions map[string]*bbgo.Exchange
|
||||||
bbgo.Notify(alert)
|
bbgo.Notify(alert)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
selectedSession, submitOrder := s.selectSessionForCurrency(ctx, sessions, currency, q)
|
selectedSession, submitOrder := s.selectSessionForCurrency(ctx, sessions, currency, q)
|
||||||
if selectedSession != nil && submitOrder != nil {
|
if selectedSession != nil && submitOrder != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user