binance-trading-bot icon indicating copy to clipboard operation
binance-trading-bot copied to clipboard

SELL recommendation is not cancelling the buy order created by the BUY recommendation

Open uhliksk opened this issue 2 years ago • 4 comments

Version

v0.0.88 (9c2e4f5)

Description

When the buy order is placed because of BUY recommendation it should also cancel the buy order if recommendation will change to SELL.

To Reproduce

  1. Wait for BUY recommendation.
  2. Buy order is created automatically.
  3. Wait for SELL recommendation.
  4. Buy order is not cancelled and can be possibly executed while market recommendation is SELL or even STRONG SELL.

Expected Behaviours

It should cancel the buy order if recommendation has changed to SELL or STRONG SELL.

Screenshots

image

Additional context

Alternatively it should cancel the buy order and create new buy order when TV recommendation flip back from SELL to BUY and the current price is lower then the price when the buy order was created previously.

uhliksk avatar Aug 14 '22 13:08 uhliksk

I also found this issue.

At this moment, when the TradingView indicator is only checked when the buy order is placed. So it does not place a new buy order when the TradingView indicator is changed.

However, it seems necessary to monitor the TradingView indicator and cancel the buy order if the condition is not met. I will work on this when I get time along with #483

chrisleekr avatar Aug 19 '22 13:08 chrisleekr

@chrisleekr I found what I thought is an issue is actually useful feature, but I'll try to find the solution to better suite how the actual recommendation algorithm works. Catching the flip as I mentioned in Additional context looks promising for me but I'll try in the real world first if it is really better solution.

uhliksk avatar Aug 20 '22 06:08 uhliksk

Hello guys @uhliksk @chrisleekr As always, you both have good thoughts.

From my perspective, I can see this idea as a double-edged sword because when we cancel the order when the TradingView's recommendation changes we may lose the core feature of the bot which is trying to buy at the lowest price. However, on the other hand, the recommendation itself could be a promising indicator to not buy at this moment.

So, I think maybe we can tweak this somehow to buy at the right time using both.

To be honest, I don't know which solution is the most suitable to deal with 😄

What do you think @uhliksk @chrisleekr?

habibalkhabbaz avatar Aug 20 '22 07:08 habibalkhabbaz

@uhliksk

I'll try to find the solution to better suite how the actual recommendation algorithm works

Oki, I will wait for your resolution.

@habibalkhabbaz

I can see this idea as double-edged sword because when we cancel the order when the TradingView's recommendation changes we may lose the core feature of the bot which is trying to buy at the lowest price.

I agree. It could make the bot never buy unless the very specific condition is met. Although I found if TradingView recommendation is telling not to buy, then better not to buy. Not 100% rely on it but as a reference.

To be honest, I don't know which solution is the most suitable to deal with 😄

Me too. I mean, there is no way you can predict the future of the coin. It's unpredictable.

chrisleekr avatar Aug 20 '22 13:08 chrisleekr