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: cancel orders when current price is over order price #569

Merged

Conversation

uhliksk
Copy link
Contributor

@uhliksk uhliksk commented Jan 2, 2023

Description

Cancel order when current price is over order price.

Related Issue

#566

Motivation and Context

Sometimes the market is very volatile which can cause while buy order is put the price will raise so much the buy order is not executed and stay there until price is dropped again. This is bad because sell order can't be processed while buy order is active and you can miss opportunity to sell.

Same thing with sell order when market drop rapidly and sell order is not executed then you can miss opportunity to buy low or even to trigger stop-loss because you can't sell when anothern sell order is active.

How Has This Been Tested?

Test provided in tests.

Screenshots (if appropriate):

@chrisleekr chrisleekr added the bug Something isn't working label Jan 3, 2023
@chrisleekr chrisleekr merged commit b12aa5c into chrisleekr:master Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buy order is not cancelled when current price is higher than limit price
2 participants