mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
xmaker: use bbgo.NewPositionFromMarket
This commit is contained in:
parent
450b7bb61e
commit
a3f68d7b72
|
@ -681,11 +681,7 @@ func (s *Strategy) LoadState() error {
|
|||
|
||||
// if position is nil, we need to allocate a new position for calculation
|
||||
if s.state.Position == nil {
|
||||
s.state.Position = &bbgo.Position{
|
||||
Symbol: s.Symbol,
|
||||
BaseCurrency: s.makerMarket.BaseCurrency,
|
||||
QuoteCurrency: s.makerMarket.QuoteCurrency,
|
||||
}
|
||||
s.state.Position = bbgo.NewPositionFromMarket(s.makerMarket)
|
||||
}
|
||||
|
||||
s.state.ProfitStats.Symbol = s.makerMarket.Symbol
|
||||
|
|
Loading…
Reference in New Issue
Block a user