mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
xmaker: fix position notify
This commit is contained in:
parent
4a6fb63c8b
commit
a506a00001
|
@ -693,8 +693,6 @@ func (s *Strategy) CrossRun(ctx context.Context, orderExecutionRouter bbgo.Order
|
|||
|
||||
if err := s.LoadState(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
s.Notify("xmaker: %s position is restored", s.Symbol, s.Position)
|
||||
}
|
||||
|
||||
if s.Position == nil {
|
||||
|
@ -708,6 +706,8 @@ func (s *Strategy) CrossRun(ctx context.Context, orderExecutionRouter bbgo.Order
|
|||
s.Position.Market = s.makerMarket
|
||||
}
|
||||
|
||||
s.Notify("xmaker: %s position is restored", s.Symbol, s.Position)
|
||||
|
||||
if s.ProfitStats == nil {
|
||||
if s.state != nil {
|
||||
p2 := s.state.ProfitStats
|
||||
|
|
Loading…
Reference in New Issue
Block a user