feature: use NewFromFloat

This commit is contained in:
Andy Cheng 2022-04-21 17:57:49 +08:00
parent 324c7ea432
commit cf8603e30b

View File

@ -418,7 +418,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
s.OnEmergencyStop(func() error { s.OnEmergencyStop(func() error {
// Close 100% position // Close 100% position
percentage, _ := fixedpoint.NewFromString("100%") percentage := fixedpoint.NewFromFloat(1.0)
err := s.ClosePosition(context.Background(), percentage) err := s.ClosePosition(context.Background(), percentage)
err2 := s.Suspend() err2 := s.Suspend()