mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
trigger position opening immediately after recovery
This commit is contained in:
parent
f49924caa4
commit
e856727e97
|
@ -334,6 +334,11 @@ func (s *Strategy) Run(ctx context.Context, _ bbgo.OrderExecutor, session *bbgo.
|
|||
// start to sync periodically
|
||||
go s.syncPeriodically(ctx)
|
||||
|
||||
// try to trigger position opening immediately
|
||||
if s.state == WaitToOpenPosition {
|
||||
s.emitNextState(PositionOpening)
|
||||
}
|
||||
|
||||
// start running state machine
|
||||
s.runState(ctx)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user