mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
grid: fix parameter checking for fixed amount
This commit is contained in:
parent
5ef1ee927b
commit
1de4e5ee4c
|
@ -126,8 +126,8 @@ func (s *Strategy) Validate() error {
|
|||
return fmt.Errorf("profit spread should bigger than 0")
|
||||
}
|
||||
|
||||
if s.Quantity == 0 && s.QuantityScale == nil {
|
||||
return fmt.Errorf("quantity or scaleQuantity can not be zero")
|
||||
if s.Quantity == 0 && s.QuantityScale == nil && s.FixedAmount == 0 {
|
||||
return fmt.Errorf("amount, quantity or scaleQuantity can not be zero")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user