-
-
Notifications
You must be signed in to change notification settings - Fork 296
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
Conversation
Welcome back! @kbearXD, This pull request may get 217 BBG. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ 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
Continue to review full report in Codecov by Sentry.
|
Re-estimated karma: this pull request may get 250 BBG |
pkg/strategy/dca2/open_position.go
Outdated
var quantity fixedpoint.Value | ||
// all the profit will use in the first order | ||
if i == 0 { | ||
profit = market.TruncatePrice(profit) |
There was a problem hiding this comment.
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?
There was a problem hiding this 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
Re-estimated karma: this pull request may get 265 BBG |
fix precision problem truncate profit first
6e3d377
to
9ac8bb9
Compare
Re-estimated karma: this pull request may get 270 BBG |
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! |
No description provided.