mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 00:01:09 +00:00
bbgo: add more simple slice types to FilterSimpleArgs
This commit is contained in:
parent
e48ae215e5
commit
d4398bbbf9
|
@ -361,7 +361,7 @@ func (e *GeneralOrderExecutor) ClosePosition(ctx context.Context, percentage fix
|
|||
tagStr := strings.Join(tags, ",")
|
||||
submitOrder.Tag = tagStr
|
||||
|
||||
Notify("closing %s position %s with tags: %v", e.symbol, percentage.Percentage(), tagStr)
|
||||
Notify("Closing %s position %s with tags: %v", e.symbol, percentage.Percentage(), tagStr)
|
||||
|
||||
_, err := e.SubmitOrders(ctx, *submitOrder)
|
||||
return err
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
func FilterSimpleArgs(args []interface{}) (simpleArgs []interface{}) {
|
||||
for _, arg := range args {
|
||||
switch arg.(type) {
|
||||
case int, int64, int32, uint64, uint32, string, []byte, float64, float32, fixedpoint.Value, time.Time:
|
||||
case int, int64, int32, uint64, uint32, string, []string, []byte, float64, []float64, float32, fixedpoint.Value, time.Time:
|
||||
simpleArgs = append(simpleArgs, arg)
|
||||
default:
|
||||
rt := reflect.TypeOf(arg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user