mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-14 02:53:50 +00:00
grid2: fix feeRate var
This commit is contained in:
parent
f727f314e6
commit
fcf8613319
|
@ -127,7 +127,7 @@ func (s *Strategy) Validate() error {
|
||||||
// the min fee rate from 2 maker/taker orders
|
// the min fee rate from 2 maker/taker orders
|
||||||
minProfitSpread := s.FeeRate.Mul(fixedpoint.NewFromInt(2))
|
minProfitSpread := s.FeeRate.Mul(fixedpoint.NewFromInt(2))
|
||||||
if percent.Compare(minProfitSpread) < 0 {
|
if percent.Compare(minProfitSpread) < 0 {
|
||||||
return fmt.Errorf("profitSpread %f %s is too small, less than the fee rate: %s", s.ProfitSpread.Float64(), percent.Percentage(), feeRate.Percentage())
|
return fmt.Errorf("profitSpread %f %s is too small, less than the fee rate: %s", s.ProfitSpread.Float64(), percent.Percentage(), s.FeeRate.Percentage())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user