mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 01:01:56 +00:00
MINOR: add log when there is error at calculating and emit profit
This commit is contained in:
parent
f7cce9fc9f
commit
53b72194f9
|
@ -202,7 +202,9 @@ func (s *Strategy) runTakeProfitReady(ctx context.Context, next State) {
|
|||
// reset position
|
||||
|
||||
// calculate profit stats
|
||||
s.CalculateAndEmitProfit(ctx)
|
||||
if err := s.CalculateAndEmitProfit(ctx); err != nil {
|
||||
s.logger.WithError(err).Warn("failed to calculate and emit profit")
|
||||
}
|
||||
|
||||
// reset position and open new round for profit stats before position opening
|
||||
s.Position.Reset()
|
||||
|
|
Loading…
Reference in New Issue
Block a user