mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
use mid price to calculate weight
This commit is contained in:
parent
0690518dc7
commit
add9372eba
|
@ -175,7 +175,7 @@ func (s *Strategy) prices(ctx context.Context) (types.ValueMap, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
m[currency] = ticker.Last
|
||||
m[currency] = ticker.Buy.Add(ticker.Sell).Div(fixedpoint.NewFromFloat(2.0))
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user