mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +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")
|
return fmt.Errorf("profit spread should bigger than 0")
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.Quantity == 0 && s.QuantityScale == nil {
|
if s.Quantity == 0 && s.QuantityScale == nil && s.FixedAmount == 0 {
|
||||||
return fmt.Errorf("quantity or scaleQuantity can not be zero")
|
return fmt.Errorf("amount, quantity or scaleQuantity can not be zero")
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue
Block a user