Skip to content

Conversation

@kbearXD
Copy link
Collaborator

@kbearXD kbearXD commented Apr 18, 2023

No description provided.

@kbearXD kbearXD requested review from c9s and gx578007 April 18, 2023 03:12
@bbgokarma-bot
Copy link

Hi @kbearXD,

This pull request may get 367 BBG.

To receive BBG token, please left your polygon address as an issue comment in this pull request with the following format, e.g.,

polygon:0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B

Once this pull request is merged, your BBG token will be sent to your wallet.

@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Attention: 106 lines in your changes are missing coverage. Please review.

Comparison is base (5c33c76) 19.98% compared to head (3717569) 19.92%.
Report is 1419 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1152      +/-   ##
==========================================
- Coverage   19.98%   19.92%   -0.07%     
==========================================
  Files         452      453       +1     
  Lines       34281    34387     +106     
==========================================
  Hits         6852     6852              
- Misses      26883    26989     +106     
  Partials      546      546              
Files Coverage Δ
pkg/strategy/grid2/grid_order_states.go 0.00% <0.00%> (ø)
pkg/strategy/grid2/strategy.go 26.64% <0.00%> (-1.08%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c33c76...3717569. Read the comment docs.

}
}

func (s *GridOrderStates) AddCreatedOrders(createdOrders ...types.Order) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just AddOrders ?

var errs error

for _, order := range s.Orders {
if order.OrderID == 0 {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if Order ID not 0 then continue?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this if?

GridProfitStats *GridProfitStats `persistence:"grid_profit_stats"`
Position *types.Position `persistence:"position"`

// this is used to check all generated orders are placed
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update comment GridOrderStates is used to ...

s.logger.Infof(sb.String())
}

func (s *Strategy) debugSubmitOrders(desc string, orders []types.SubmitOrder) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a similar method already?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but that's only for types.Order.

"go.uber.org/multierr"
)

type GridOrder struct {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call this OrderTag to avoid confusing?

RecoverGridByScanningTrades bool `json:"recoverGridByScanningTrades"`
SkipSpreadCheck bool `json:"skipSpreadCheck"`
RecoverGridByScanningTrades bool `json:"recoverGridByScanningTrades"`
RecoverFailedOrdersWhenGridOpening bool `json:"recoverFailedOrdersWhenGridOpening"`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to RecoverFailedOrdersWhenOpeningGrid

@CLAassistant
Copy link

CLAassistant commented Jan 24, 2024

CLA assistant check
All committers have signed the CLA.

@c9s c9s force-pushed the grid2/feature/recover-when-grid-opening-error branch from 3717569 to 456aff4 Compare August 18, 2025 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants