xmaker: assign position strategy id and instance id

This commit is contained in:
c9s 2024-08-24 12:01:11 +08:00
parent 6ef8aa62e5
commit f7dc07327e
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -770,9 +770,8 @@ func (s *Strategy) CrossRun(
if s.Position == nil {
s.Position = types.NewPositionFromMarket(s.makerMarket)
// force update for legacy code
s.Position.Market = s.makerMarket
s.Position.Strategy = ID
s.Position.StrategyInstanceID = instanceID
}
bbgo.Notify("xmaker: %s position is restored", s.Symbol, s.Position)