You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the possible solutions will be filter decisions in adjust_decisions():
# Adjust decisions based on trading parameters
def adjust_decisions(decisions):
sell_decisions = [
decision for decision in decisions
if decision['decision'] == "sell" and MIN_SELLING_AMOUNT_USD <= decision['amount'] <= MAX_SELLING_AMOUNT_USD
]
buy_decisions = [
decision for decision in decisions
if decision['decision'] == "buy" and MIN_BUYING_AMOUNT_USD <= decision['amount'] <= MAX_BUYING_AMOUNT_USD
]
hold_decisions = [decision for decision in decisions if decision['decision'] == "hold"]
return sell_decisions + buy_decisions + hold_decisions
Sometimes you can see that bot can't sell stocks because of this error:
Not enough shares to sell
.Log example:
It will be great if bot will prevent it before sell attempt.
Info about this error from Robinhood: https://robinhood.com/us/en/support/articles/not-enough-shares-error/
The text was updated successfully, but these errors were encountered: