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] all the profit will use in the first order of the next round #1552

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

kbearXD
Copy link
Collaborator

@kbearXD kbearXD commented Mar 1, 2024

No description provided.

@bbgokarma-bot
Copy link

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

@CLAassistant
Copy link

CLAassistant commented Mar 1, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

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

Project coverage is 21.76%. Comparing base (7abc45e) to head (9ac8bb9).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1552      +/-   ##
==========================================
+ Coverage   21.74%   21.76%   +0.01%     
==========================================
  Files         608      608              
  Lines       44014    44020       +6     
==========================================
+ Hits         9573     9579       +6     
  Misses      33759    33759              
  Partials      682      682              
Files Coverage Δ
pkg/strategy/dca2/open_position.go 49.41% <90.00%> (+3.84%) ⬆️

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 7abc45e...9ac8bb9. Read the comment docs.

@bbgokarma-bot
Copy link

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

var quantity fixedpoint.Value
// all the profit will use in the first order
if i == 0 {
profit = market.TruncatePrice(profit)
Copy link
Owner

Choose a reason for hiding this comment

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

why not truncate profit outside of the loop?

Copy link
Owner

@c9s c9s left a comment

Choose a reason for hiding this comment

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

please wait for @gx578007 's review

@bbgokarma-bot
Copy link

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

@c9s c9s changed the title dca2: all the profit will use in the first order of the next round FIX: [dca2] all the profit will use in the first order of the next round Mar 4, 2024
fix precision problem

truncate profit first
@kbearXD kbearXD force-pushed the kbearXD/dca2/quote-investment-modify branch from 6e3d377 to 9ac8bb9 Compare March 4, 2024 06:50
@bbgokarma-bot
Copy link

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

@kbearXD kbearXD merged commit 449c0ab into main Mar 4, 2024
5 checks passed
@kbearXD kbearXD deleted the kbearXD/dca2/quote-investment-modify branch March 4, 2024 06:59
@bbgokarma-bot
Copy link

Hi @kbearXD,

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

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

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.

4 participants