-
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
Coin price <10$ bot deletes last buy price #190
Comments
First of all, I don't think this is a bug as intended behaviour. I will change to the discussion label. Secondly, the intention of that feature was to avoid the bot holding residue amount of the coin and do not continue the trade. After the bot is selling the coin, there will be a very small amount of the coin left. If you remove that feature, it will be remembering the last buy price with the amount you cannot sell. |
Ok, I've understand it. But when the bot sells for example 10.0 DOGE, it will left about 0.01~0.02 DOGE. Ok. But the bot already knows it sold the amount of coins it had bought, so it will remove the last buy price. It will not pass through the function that calculates if it is below the threshold. I'll like to help. |
The bot does not know the order is executed. If you continuously check the order execution status, you will definitely over the API limit. The bot is checking the amount of coin to decide whether to buy or sell.
Always welcome :) |
Good to know. Didn't know that.
And if we store the amount of coins it bought in the mongo DB? Then it should never sell above what it had last bought. Like that: Bot buys 10.00 of X coin at 100$ price. Bot waits to sell. Two outputs may happen. 1 - Coin drops below 10$. Bot verifies if the coin is less than minimum to sell. Bot price is erased. 2 - Coin spike up, bot sells the amount of 10.00. In the same function that sells, it erases the last buy price. Another outcome:
Then the coin hits the trigger price to buy. Bots buy 10.00 of X coin. Now bot have 20.00 in hand. Then the coin spikes up and reach the profit trigger. Bot sells but not only the last 10.00 it had bought, but the total amount of 20.00 (even though you are at loss in the first's 10.00 coin bought), making a loss.
let's be frends I couldn't really see a problem having that switch, could you clarify that to me? And just to letting you know, I've made an addition to your code, had added a checkbox to let you choose wether you want the bot to remove the last buy price when it get below the threshold. Some people at the discord found it useful and I went ahead with the help of a user named Seth. If it's useful to you I can open a pull request. Like that: #edit Oh sorry. My bad. |
Remove your address bar in the screenshot or restart to reset the local tunnel. Anyone would be able to access your bot. So in your scenario, you only purchase $10 worth of the coin, right?
The bot does not sell the exact amount of $10, the bot will sell whatever you configured the sell trigger percentage.
It looks like what you are asking is this #158
The main problem with not removing the last buy price is because the bot will continue the monitor the coin that you cannot place an order.
I think it is too early stage to just implement it, let's discuss it further to make sure it is the correct implementation. |
Oh sorry, had forgot about it!! Didn't have any bidens to spent anyway.
Yes. The bot first purchased
Let me clarify
Then the price dropped to 4$. The coin don't worth more than 10$ then the bot will remove the last buy, but hold the 10$ worth of coin. Then the coin dropped to the buy trigger, bot buys more 10$ worth of X coin at price $3.5 Bot sells the coins holded (the total 20$ worth of them) at price $3.75 (it thinks it is selling them at a 7% profit, but the only profitable are the coins bought at $3.5). It sold the coins bought at $5 with a loss of -25%. While it sold the coins bought at $3.5 with 7% of profit. Hope you understand my English
But that way we can at least see our loss percentage, and the bot won't do what I've wrote above. I'm just speculating, sorry to bother. |
So what you are asking is basically grid trading which is duplicated issue with #158. Am I right? But it still does not solve the issue that I said above:
What am I missing from your context? |
First of all, good morning. :)
You get it. It almost seems like a grid trading when I read what I wrote. But the point is: the bot should only sell in a profit. If it do not erase the last buy price when it reaches below 10$, it wouldn't buy more coins, and won't sell at a loss. In a sharp drop like the last days, this function would save a lot of money. Simply because the bot won't lose the last buy price. My bot had bought 10$ worth of MATIC. Then the sharp drop came and my coin lost its value, making the bot erase the last buy price. No problem until it reached my buy trigger, and bought more 15$ worth of MATIC. Then it sold all of my 25$ worth of MATIC when it reached the second coin batch profit trigger. But I've only got 20$ back. It sold at a loss of 5$.
But I still don't get why it keep monitoring the coin that you can't sell is a bad thing. It's just because of API limit? Btw: A user in discord liked the checkbox to set wether the bot should or not remove the last buy price. And he said it is working perfectly. |
Hey @pedrohusky I have been thinking about this last night. The main issue with your case is buying a minimum amount of $10 which can easily go down to $10. But I assume other traders may want to buy only $10 depending on their investment strategy. By removing the process of removing the last buy price can cause two issues:
Simply disabling the process of removing the last buy price is not gonna work for the above-mentioned issues. The solution for this is I let the trader be able to customise with disabling the sell when the coin does not meet the minimum notional value.
I think this way you can keep the last buy price less than $10. |
It should not happen. It should save the last buy price until it sell the coin.
Example:
1 - coin drops below 10$
2 - bot removes the last buy price
3 - coin drops more until buy trigger
4 - bot buys at lowest price
5 - bot waits until profit
6 - bot sells the coin with profit. BUT it sells all the coins holded, included the last one that you still have a loss.
7 - if in step 5 it continues to fall down, it will repeat the steps all over again
The text was updated successfully, but these errors were encountered: