mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
xmaker: assign position strategy id and instance id
This commit is contained in:
parent
6ef8aa62e5
commit
f7dc07327e
|
@ -770,9 +770,8 @@ func (s *Strategy) CrossRun(
|
||||||
|
|
||||||
if s.Position == nil {
|
if s.Position == nil {
|
||||||
s.Position = types.NewPositionFromMarket(s.makerMarket)
|
s.Position = types.NewPositionFromMarket(s.makerMarket)
|
||||||
|
s.Position.Strategy = ID
|
||||||
// force update for legacy code
|
s.Position.StrategyInstanceID = instanceID
|
||||||
s.Position.Market = s.makerMarket
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bbgo.Notify("xmaker: %s position is restored", s.Symbol, s.Position)
|
bbgo.Notify("xmaker: %s position is restored", s.Symbol, s.Position)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user