Skip to content

Commit

Permalink
trigger position opening immediately after recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
kbearXD committed May 13, 2024
1 parent f49924c commit e856727
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/strategy/dca2/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit e856727

Please sign in to comment.