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

Market vs limit sell, recommended code change #231

Open
birk151 opened this issue Dec 3, 2022 · 0 comments
Open

Market vs limit sell, recommended code change #231

birk151 opened this issue Dec 3, 2022 · 0 comments

Comments

@birk151
Copy link

birk151 commented Dec 3, 2022

Cannot trade profitably with low volume coins. Market sell orders trigger at TP, but will often sell for less then the buy price due to low volume.

Suggest changing sell parameter to:

            if not TEST_MODE:
                sell_coins_limit = client.create_order(
                    symbol = coin,
                    side = 'SELL',
                    type = 'LIMIT',
                    price = coins_bought[coin]['take_profit']
                    timeinForce = 'GTC',
                    quantity = coins_bought[coin]['volume']

                )

This of course eliminates the trailing profit function but will guarantee the sale price to be the TP as intended.

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

No branches or pull requests

1 participant