-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: support of manual trades in breakeven amount calculator #601
Merged
chrisleekr
merged 18 commits into
chrisleekr:master
from
rando128:fix/refactor-next-best-buy-amount-calculation
Mar 20, 2023
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
66fabda
Fix:nextBestBuyAmount on server with correct sell trigger percentage
bdff4b3
feat: support manual orders scenario with 2 new input fields
095128e
test: (wip) adding tests
chrisleekr e8e8373
refactor: moved out next best buy amount as function
chrisleekr 3fe0e1f
test: (wip) adding tests
chrisleekr b97a6a8
test: (wip) adding tests
chrisleekr bef30a3
test: fixed get-indicator test
chrisleekr 1ea1b1a
refactor: clean up calculation and push nextBestBuyCalculation info t…
ad5200e
fix: remove invalid lastbuyprice condition
76aff29
test: fixed get-indicator test
chrisleekr 4c45611
Merge branch 'fix/refactor-next-best-buy-amount-calculation' of https…
chrisleekr 590e0f3
lint: fixed typo
chrisleekr e6a9f10
feat: add conservative sell indication to sellTrigger field
e57a303
fix: compute properly buyTriggerWithCurrentPrice in the front. Force …
e2fa7e1
chore: move buyTrigger into calculateNextBestBuyAmount function
f450649
fix: calculateNextBestBuyAmount if we have a lastBuyPrice
d39c51d
test: fixed get-indicator test
chrisleekr 7bc5f92
docs: updated CHANGELOG.md
chrisleekr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@rando128
I found when the
lastBuyPrice
is not configured, which will set asnull
, it returnsInfinity
forbuyTrigger
.Is
Infinity
intended or it should be 1?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.
Good catch. It doesn't make sense to even try to calculate it in this case. Maybe we could condition nextBestBuyCalculation code with a
if(lastBuyPrice > 0)
statement on line 391There 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.
Ok, good. Do you want to update, or do you want me to update? :)
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.
Fix just pushed!
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.
yay! I will check the tests and let's merge it.