Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: [dca2] must calculate and emit profit at the end of the round #1580

Merged
merged 3 commits into from Mar 14, 2024

Conversation

kbearXD
Copy link
Collaborator

@kbearXD kbearXD commented Mar 14, 2024

No description provided.

@bbgokarma-bot
Copy link

Welcome back! @kbearXD, This pull request may get 261 BBG.

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 2.70270% with 36 lines in your changes are missing coverage. Please review.

Project coverage is 22.39%. Comparing base (3a98660) to head (2b52211).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1580      +/-   ##
==========================================
- Coverage   22.40%   22.39%   -0.01%     
==========================================
  Files         615      616       +1     
  Lines       44436    44459      +23     
==========================================
+ Hits         9954     9955       +1     
- Misses      33772    33794      +22     
  Partials      710      710              
Files Coverage Δ
pkg/strategy/dca2/state.go 0.00% <0.00%> (ø)
pkg/exchange/max/maxapi/order.go 0.00% <0.00%> (ø)
pkg/strategy/dca2/recover.go 38.15% <10.00%> (+0.79%) ⬆️
pkg/strategy/dca2/strategy.go 0.65% <0.00%> (-0.06%) ⬇️

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 3a98660...2b52211. Read the comment docs.

pkg/strategy/dca2/strategy.go Outdated Show resolved Hide resolved
pkg/strategy/dca2/state.go Outdated Show resolved Hide resolved
@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 308 BBG

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 313 BBG

@kbearXD kbearXD requested a review from c9s March 14, 2024 06:12
@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 318 BBG

@c9s c9s changed the title dca2: must calculate and emit profit at the end of the round FIX: [dca2] must calculate and emit profit at the end of the round Mar 14, 2024
return nil
}

return retry.GeneralLiteBackoff(ctx, op)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think putting all the orders in this round in the returned error for more debug info?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will print all the rounds and its orders when calculating.

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 338 BBG

@kbearXD kbearXD requested a review from gx578007 March 14, 2024 08:37
@kbearXD kbearXD merged commit 3981970 into main Mar 14, 2024
3 of 5 checks passed
@kbearXD kbearXD deleted the kbearXD/dca2/profit branch March 14, 2024 08:42
@bbgokarma-bot
Copy link

Hi @kbearXD,

Well done! 343 BBG has been sent to your polygon wallet. Please check the following tx:

https://polygonscan.com/tx/0x302f0acde34b13cb2db86a7b2da34dcf068352502e32055431dfa7003a82df0f

Thank you for your contribution!

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.

None yet

5 participants