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

feat(configuration): execute stop-loss before buy #299

Open
bangbaew opened this issue Sep 7, 2021 · 3 comments
Open

feat(configuration): execute stop-loss before buy #299

bangbaew opened this issue Sep 7, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@bangbaew
Copy link

bangbaew commented Sep 7, 2021

Version

0.0.78

Description

I set my stop loss to 0.95, and the bot would normally sell when price drops to 5%.
I'm not sure if it's the bug in this version, because stop loss works well on the previous versions.

Screenshots

image
image

The % of difference to stop loss is also showing negative value but not triggering.
Now I'm losing more than 20% of my portfolio haha.

@bangbaew bangbaew added the bug Something isn't working label Sep 7, 2021
@chrisleekr
Copy link
Owner

chrisleekr commented Sep 8, 2021

Hm.

So in this case, what happened is, buy action got the priority of the stop-loss action. When the bot determines the action to do, it checks whether it should buy or not. And if not, it checks whether to stop-loss or not.

In your case, the grid trade 2 trigger price is higher than the stop-loss trigger price, so the bot is trying to buy, no stop-loss. But buy action couldn't be executed due to not enough USDT.

It's correct (expected) behaviour because buy action is determined and I don't want the bot to stop-loss without buying grid trade 2. But in your case, you may want to stop-loss first? Hm... I am not sure what is the best strategy.

Code reference:

@bangbaew
Copy link
Author

bangbaew commented Sep 9, 2021

Hm.

So in this case, what happened is, buy action got the priority of the stop-loss action. When the bot determines the action to do, it checks whether it should buy or not. And if not, it checks whether to stop-loss or not.

In your case, the grid trade 2 trigger price is higher than the stop-loss trigger price, so the bot is trying to buy, no stop-loss. But buy action couldn't be executed due to not enough USDT.

It's correct (expected) behaviour because buy action is determined and I don't want the bot to stop-loss without buying grid trade 2. But in your case, you may want to stop-loss first? Hm... I am not sure what is the best strategy.

Code reference:

Oh I see, I think the bot, in my case, should do the stop-loss as the first priority for safety, and cancel grid buy if not have enough money.

My other question is my "Add new grid trade" for sell button is greyed out, how can I configure grid sell?
image

Thanks.

@chrisleekr
Copy link
Owner

Oh I see, I think the bot, in my case, should do the stop-loss as the first priority for safety, and cancel grid buy if not have enough money.

Hmm, that is depending on your strategy. But at his point, it does not have the configuration for it.

I will add it to TODO to be able to configure it in the future.

My other question is my "Add new grid trade" for sell button is greyed out, how can I configure grid sell?

That is because you sell 100% of your coin in the grid trade 1.
Reduce sell quantity percentage, then you will see "Add new gird trade" available.

@chrisleekr chrisleekr added enhancement New feature or request and removed bug Something isn't working labels Sep 9, 2021
@chrisleekr chrisleekr changed the title Bot not placing stop loss feat(configuration): execute stop-loss before buy Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants