Open regholl opened 2 years ago
Your mongo will be connected to the bot by plugging in your MONGO_URI to the config.py file. Once the bot is running and connected to mongo, if your config.py RUN_TA is set to False, then it will buy the equities/options as soon as the email comes in. This bot is set to specifically exit your strategy based off OCO or a trailing stop, so your sell strategy won't do anything. If you want a custom sell, then I recommend continuing with Trey Thomas's bot which this was built on.
thanks,the config.run ta was set to true so ill see if it responds now
it;s just deleting the emails with no buy
Are you running TD or Tradier? If the email is printing a line in the terminal, then whatever trader you're using must not be set up correctly. When the bot first boots, it should say: Connecting to Mongo Connected to Mongo Connecting to Gmail Connected to Gmail Connecting to TDAmeritrade Connected to TDAmeritrade Running TDAmeritrade (or Tradier) Paper Trader Starting Tasks for: Starting Websocket for:
it's setup to the point where it says it's streaming and zero positions held.i'm going to have a closer look at tasks but wont know anything til the market opens again
Is run_gmail = True? Seems like you're almost there. You can adjust the turn_off_trades, sell_all_positions, and shutdown_time to a time further than right now and send yourself emails to check it out
i'm running TD only as live trader and gmail,both set to true.mongo is connected cause i can seee the users file.RUN TA is false.run tasks was set to false but is true now.websocket is true.yeah i am almost there.your algo is actually one of the best ones on here the rest are just garbage.whatever im doing wrong i had this same problem with trey thomas's where i could never get the bot to read the email but would delete them
i MAY have found the problem.i have live trader set in the script but in mongo it says its set to paper trade.
I still think the order would have to show up. I want to transition the bot to read what's under the user account in mongo, but right now, the bot is strictly reading what's in config.py.
When setting this up initially, I definitely recommend trading with paper so that none of your capital is actually risked.
rule 101 of stocks,don't play with money you cant afford to use..i bave been doing paper trading for 6 months until i could find a suitable bot.that being said i just reauthorized tda and it keeps adding paper back to the mongo user file
Ignore what it says in mongo. If your code says RUNNING LIVE TRADER in the terminal, then you're running live
ugh,all the errors i found and stil stuck in the same problem
Are you sure the alert in the email is set up correctly? The subject line should come in something like this:
Alert: New symbols: .AMD220506P89, were added to ComfyQQE_Puts, BUY_TO_OPEN.
"ComfyQQE_Puts, BUY_TO_OPEN" is what my scan is called in ToS
mine reads as 'MyBOTStrategyBUY' as my scan i'm deleting the SELL BOT
You're having an issue on the bootup... Your turn_on_times may be wrong. You have something similar to this? Make sure you RUN_BACKTEST_TIME = "01:00:00" or some time before market open. Also, make sure you pulled the most recent git from the master branch. I know it previously ran into an error with those things.
Boot up should look like this between TURN_ON_TIME and SHUTDOWN_TIME
yep thats exactly the way mine looks.i just cant get the bot to read the emails.it looks at it then deletes it
RUN_GMAIL = True? It might be smart to print out trade_alerts on line 376 of main.py to see if it's picking up any alerts. If it doesn't find any, then it must be something in the get_alerts method
ok,i'll look into that but i just pulled an all nighter writing a whole new bot..it sort of a hybrid between yours and trey thomas.i need to at least get an hour of sleep before they ring the bell
2022-05-09T18:02:26.964 [ERROR] reginald holland - **256 - Traceback (most recent call last): File "e:\TradierTDA_Trader\assets\exception_handler.py", line 14, in wrapper return func(self, *args, **kwargs) File "e:\TradierTDA_Trader\assets\tasks.py", line 400, in killQueueOrder queue_orders = self.mongo.queue.find( AttributeError: 'MongoDB' object has no attribute 'queue'
this is what happens when the email comes in.not sure why its saying this but there is a queue because i manually put it in and im looking at it
So this could be because of a few reasons.
Make sure it looks like this in mongo
If it's still not working, your mongo URI might be wrong in config.py
this is my mongo URI ,im using cluster0 dont know if that makes a difference
mongodb+srv://XXXXXXXXXXX:XXXXXXXX@cluster0.txkrb.mongodb.net/Api_Trader?retryWrites=true&w=majority
i must be the only idiot left that still has this prob glem ,AAAARGGGGGGH!!!!
hello,,i have made both a buy and sell strategy in TOS and they are sending out emails.my question is where in the script do i add the strategies also how do i add them to mongo?