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

When updating price, use halfway between midpoint #334

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

brndnmtthws
Copy link
Owner

Previous we'd pick the midpoint price for an order, then wait a few seconds, and then pick the midpoint again. This can lead to less-than-ideal fills on illiquid dogs hit stocks/ETFs. Instead, we'll take the halfway point between the previous and updated midpoint, which should give us slightly less bad fills.

Additionally, we never want to switch a credit to a debit or vice versa, so check that the signs match before proceeding.

Previous we'd pick the midpoint price for an order, then wait a few
seconds, and then pick the midpoint again. This can lead to
less-than-ideal fills on illiquid dogs hit stocks/ETFs. Instead, we'll
take the halfway point between the previous and updated midpoint, which
should give us slightly less bad fills.

Additionally, we never want to switch a credit to a debit or vice versa,
so check that the signs match before proceeding.
@brndnmtthws brndnmtthws merged commit 5513abf into main Nov 30, 2023
8 checks passed
@brndnmtthws brndnmtthws deleted the price-update-tweak branch November 30, 2023 18:33
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.

1 participant