abghorba / Robinhood-Trading-Bot

Algorithmic trading bot that buys/sells stocks based on various conditions using Robinhood.
MIT License
60 stars 25 forks source link

Better examples of usage on readme #4

Closed amplicity closed 1 year ago

amplicity commented 1 year ago

Hey, thanks for building this! I'm finding it hard to understand how to best run the bot. Do I spin up a base trade bot via python3 base_trade_bot.py after initializing? I'm not seeing where any of the bots, IE simple_moving_average.py actually call def trade..which led me to believe I am misunderstanding how this bot is expected to be used.

Could you provide some more helpful examples using a common ticker, like AAPL, to help users understand how they can spin up each algorithm (or multiple at once)?


Another unrelated question I had was whether this bot supports retirement accounts. I wasn't able to easily discern that from the code. I'd love to see this explicitly defined on the readme as well.

Thanks again!

Motzumoto commented 1 year ago

hey im also having the same issue you're having. if you figured out how to actually run this, i'd love to know how.

amplicity commented 1 year ago

I have not yet, unfortunately

abghorba commented 1 year ago

Hi @amplicity,

Thank you so much for creating this issue and giving me feedback on this project. I realize I haven't been very clear in the README how to use the bot, so I've worked on updating it.

To summarize, you should create a new Python file in the project's root directory and import an existing (or your own) TradeBot object. However you implement the function make_order_recommendation() is what determines if the bot will buy, sell, or do nothing. We simply need to call the trade() function and pass in a ticker and an amount in dollars to activate the bot.

from src.bots.simple_moving_average import TradeBotSimpleMovingAverage

trade_bot = TradeBotSimpleMovingAverage()
trade_bot.trade(ticker="AAPL", amount_in_dollars=5.00)
abghorba commented 1 year ago

@amplicity, also to answer your question about retirement accounts... I have not tried this as I do not personally have a retirement account with Robinhood.

It's an interesting question on what happens if one has multiple accounts on Robinhood that I haven't thought of.

amplicity commented 9 months ago

Got it. I'll try it out. Thank you!