One of the most valuable things for me atm is just the organization you've put into this project. You have everything very clearly organized and well thought out and I think that's super underrated in today's "move fast and break things" attention-grabbing world. Awesome work dude! Well done!
Bro I was thinking the same thing as soon as I saw he had palpatine as a background I was like my type of guy 🙌🏼🤣🤣 a fire Sith Lord background at that!
Remember the API has “Market Hours” that returns normal days, holidays, weekends, and half days trading hours. Unfortunately, the response structure varies for the different cases but can be parsed for the information.
Thank you so much for this video. It's great that you are going through step-by-step and explaining the details of the steps. Great for beginners like myself who has a very basic knowledge of Python and no clue how to go about setting up a trading bot without any external clients like Quantconnect. Although it is easier to just download the package, I typed every step myself as stated in the video to learn more and to better understand how the bot works. Good job!
You are correct when you said "game theory." Algo's for long-short strategy, short only, long only and / or covered calls. Identifying those variables in the different algorithms and meshing them on a cohesion basis. Meshing all indicators and alerts ⚠️. It can be done, are you anywhere close at all?
A couple questions, how do you familiarize yourself with all the datetime functions to create this? it looks extra complicated to just see if market is open or not. I guess i am just new to programming but also how are the times 12 and 22 understood as standard time? I want to know how to set the time properly if i need to do so in the future.
Since Schwab bought TD Ameritrade after this series was put out, do you have a fix or recommendation for a similar API? TD won't let me sign up for their old API in favor of Schwab's. Apologies if this was already explained somewhere and I missed it.
In my country, we can’t use td Ameritrade unfortunately, how would you go about incorporating the API for another company like Interactive Brokers for example?
would anyone happen to know why "from td.client" is not working for me. i installed the td ameritrade python API library. It's telling me import "td.client" could not be resolved. It says the same thing for "td.utils" I would greatly appreciate any help
Hi sorry I'm an idiot and have no idea how ot run the pip setup, I've run the command in the command line and get a 1000 errors, I've run it in VS code with the completed code and get the same errors as the command line, the error tends to happen in the 'preparing wheel medata' section and everything just fails.
No worries, I'm sure we can figure it out. If you're in Visual Studio Code, it's super simple to install package. If you want to do a "developmental install" like I do in the video. Then all you need to do is open, in Visual Studio Code, the folder where the "setup.py" file is. Once it's opened, then simply run the following line in your terminal. pip install -e . Let me know if that works for you.
Hi everyone! I'm having a major issue with the setup.py, I can't manage to run it... I've updated my python and each time I run in the directory: "pip install -e ." to install the requirements I get: "ERROR: Package 'python-trading-robot' requires a different Python: 3.7.6 not in '>=3.8'". (I'm running python 3.8.2 64bits) What must I do? I really can't get around the problem... Please help me, I really want to learn about this project!
Ok. I’ve been watching your vids on and off. Great content! Excellent instructions! I have a little programming background/experience - python, java, etc. should I start with your TDA API setup series then proceed to this series?
I mean it won't hurt because it'll help give some more clarity to how I use it in this series. However, technically speaking you don't need to because a lot of the functionality here is stuff I've written specifically for this library. Anything I'm doing with the TD API is behind the scenes and isn't necessary when using the library.
again can i do this to any platform and i dont have knowledge about python but its amazing that the robot gets information from API and i cant even imagine how it does that.
quick question if anyone can answer: Is there a library that has preset trading strategies or indicators anywhere on the net? or is this just something that all algo-traders have to build out themselves?
Is there anyway you can make the code that you’re typing visually larger. I travel a lot and I watch videos on my iPad. Consequently, the screen is much smaller and I have a very difficult time seeing what your typing. Besides, as far as I can tell, there’s nothing but a bunch of unused white screen to the right of your code anyway?
Thank you for sharing how to do this! I did want to ask if I want to trade futures on TD with the robot is it the same but with the futures ticker and what about the time? I currently trade futures on TD. Thanks again for your time.
Great video, thank you so much! I was thinking for pre_market, right now should not be equal to market_start_time and for post_market, not equal to market_end_time. What do you think?
Ok so I just realized that its not using MetaTrader 4 as a client. (I dont know why I was assuming it would I just did.) and I want to know if its compatible with MT4 or if there are any emendations we could do to make it use MT4.
@@SigmaCoding Ok thanks alot. The sad part is I specifically searched for MT4 coding bot python. and this showed up. I was so excited. I got a bunch of amateurs in finance and coding together to work on this. Only to realize that its not in MT4. Theoretically speaking though. It is possible to take out the TD api and switch it with a MT4 api? as long as the all the connections calling for TD api are fullfilled in the new MT4 api? I am currently looking at your TD api to see everything that includes so I can include it in the new one. MT4 is also a trading market. Only it uses foreign exhange,
If you pip install the trading robot library, it will install the TD library for you as well. It's in the setup.py file, so just run the pip install on the trading robot library.
@@ishpen282 It should, but just be aware that PyCharm sets up the workspace environment a little differently than VS Code. People seem to run into issues when they try to run locally installed packages on PyCharm.
Hello!! I just wonder with some timestamps that you created! I thought Stock Market in US following this schedule. 4:00 am to 9:30 am = pre market time 9:30 am to 4:00 pm = market time 4:00 pm to 8:00 pm = post market time And i guess you setted time for pre market and post market less than those time. Maybe i have misunderstanding but could you give me reasons? ps, your lecture is just awesome!
So the timestamps you're seeing are in UTC time because I can't assume everyone would be in PST time. The best work around is to put it in UTC time. Does that answer your question?
@@SigmaCoding Great material here!!! I had the same question as Subin. I understood Subin's question as: should the pre_market be 8:00(UTC) to 13:30(UTC) which would be 4:00(EST) to 9:30(EST)? Then the same for post market at 20:00(UTC) to 24:00(UTC) which would be 16:00(EST) to 20:00(EST). This would be different for OTC and foreign markets.
I know you can’t assume that everyone will be in the same zone, but you don’t have to assume the users time zone for the US stock market because it’s in EST. So would it not just be easier to call the api from TD to check?
It would change depending on daylight savings time. 9.30AM Eastern = 2.30PM UTC or 1.30PM UTC so either 13:30 UTC or 14:30 UTC pre-market end / regular-market start depending on EST/EDT. Gets complicated fast :)
@@sanjeevpanicker9813 Thanks, Sanjeev. You've answered the question of why the UTC times in this video weren't matching up for me. Daylight savings is in effect now.
I mean you could run the robot using a Jupyter Notebook, but I wouldn't want to develop this library using a Jupyter Notebook. It would be unnecessarily difficult compared to Visual Studio Code.
PLEASE DEAR ALEX HOW CAN I WRITE THE CODE SOO THE BOT CAN PLACE A BUY AND SELL TRADE AT THE SAME TIME WITH A 4 PIPS STOP LOSS IN PYTHON TNX UU IN ADVANCE
Thanks for the video! When importing td.utils I get the message: cannot import name 'milliseconds_since_epoch' from 'td.utils'. I tried unsuccessfully to pip install it. Any ideas to make it work?
for recent python versions you need these 2 lines instead (see github file) from td.utils import TDUtilities milliseconds_since_epoch = TDUtilities().milliseconds_since_epoch
One of the most valuable things for me atm is just the organization you've put into this project. You have everything very clearly organized and well thought out and I think that's super underrated in today's "move fast and break things" attention-grabbing world. Awesome work dude! Well done!
i really appreciate how much time you put into these. they might go over time sometimes but it's been good going through the code with you.
Well thank you for the support!
Only a man of quality uses a Darth Sidious background... claps to you
FINALLY, somebody brought it up! I've been waiting for so long!
Bro I was thinking the same thing as soon as I saw he had palpatine as a background I was like my type of guy 🙌🏼🤣🤣 a fire Sith Lord background at that!
You're amazing man, there are no words to describe how thankful I am to find your videos.
Thank you for the time you put into them
Remember the API has “Market Hours” that returns normal days, holidays, weekends, and half days trading hours. Unfortunately, the response structure varies for the different cases but can be parsed for the information.
Thanks for making this and walking through all the code. That is really cool.
No problem!
Thank you so much for this video. It's great that you are going through step-by-step and explaining the details of the steps. Great for beginners like myself who has a very basic knowledge of Python and no clue how to go about setting up a trading bot without any external clients like Quantconnect. Although it is easier to just download the package, I typed every step myself as stated in the video to learn more and to better understand how the bot works. Good job!
You are correct when you said "game theory." Algo's for long-short strategy, short only, long only and / or covered calls. Identifying those variables in the different algorithms and meshing them on a cohesion basis. Meshing all indicators and alerts ⚠️. It can be done, are you anywhere close at all?
40k of the viewers just used your github code :( . I am gonna watch the whole playlist :D.
Thanks from Colombia!! You have been really helpful for me with this series!!
You're the best thank you so much for this series!
You're very welcome!
A couple questions, how do you familiarize yourself with all the datetime functions to create this? it looks extra complicated to just see if market is open or not. I guess i am just new to programming but also how are the times 12 and 22 understood as standard time? I want to know how to set the time properly if i need to do so in the future.
I tried entering "from td.utils import millliseconds_since_epoch" in VS Code to import the utilities module, but it isn't working. Any suggestions?
Since Schwab bought TD Ameritrade after this series was put out, do you have a fix or recommendation for a similar API? TD won't let me sign up for their old API in favor of Schwab's. Apologies if this was already explained somewhere and I missed it.
I know this is an old video, but do you know if there are any updates to this with Schwab?
Im unable to run the setup file. Are there changes in the packages i should be aware of? I've even tried using PyPi
so does this run as a web server to communicate with the TD Ameritrade API?
Hi! Have you found a solution for the py code to understand if we are on a weekend or holiday? Or it would probably digress a bit from the main topic?
I believe Epcot is part of Disney world, whereas Epoch is... epoch.
Appreciate the vids and your repo!
You caught me! lol
Im in the Uk and can't access a TD Ameritrade account. What alternative can I use?
In my country, we can’t use td Ameritrade unfortunately, how would you go about incorporating the API for another company like Interactive Brokers for example?
which version of VS are you using ..The 2022 one is complicated
BY ALL MEANS , THANK YOU FOR MAKING THIS VIDEO
would anyone happen to know why "from td.client" is not working for me. i installed the td ameritrade python API library. It's telling me import "td.client" could not be resolved. It says the same thing for "td.utils" I would greatly appreciate any help
Make sure the environment is using the correct versions of pandas & numpy from the requires.txt file. Specifically pandas has to be 1.0.5
Will this work with the new Schwab since they bought out TDAmeritrade?
Cool stuff!
can you do price action trading bot, but don't use any price lagging indicators ?
Is it possible to create this bot on my iPad Pro?
can i do it in for Binance
Hi sorry I'm an idiot and have no idea how ot run the pip setup, I've run the command in the command line and get a 1000 errors, I've run it in VS code with the completed code and get the same errors as the command line, the error tends to happen in the 'preparing wheel medata' section and everything just fails.
No worries, I'm sure we can figure it out. If you're in Visual Studio Code, it's super simple to install package. If you want to do a "developmental install" like I do in the video. Then all you need to do is open, in Visual Studio Code, the folder where the "setup.py" file is. Once it's opened, then simply run the following line in your terminal.
pip install -e .
Let me know if that works for you.
Hi everyone! I'm having a major issue with the setup.py, I can't manage to run it... I've updated my python and each time I run in the directory: "pip install -e ." to install the requirements I get: "ERROR: Package 'python-trading-robot' requires a different Python: 3.7.6 not in '>=3.8'". (I'm running python 3.8.2 64bits) What must I do? I really can't get around the problem... Please help me, I really want to learn about this project!
That's odd, it's saying it needs you to have python 3.7?
Ok. I’ve been watching your vids on and off. Great content! Excellent instructions! I have a little programming background/experience - python, java, etc. should I start with your TDA API setup series then proceed to this series?
I mean it won't hurt because it'll help give some more clarity to how I use it in this series. However, technically speaking you don't need to because a lot of the functionality here is stuff I've written specifically for this library. Anything I'm doing with the TD API is behind the scenes and isn't necessary when using the library.
Hı. I got errors when ı trıed to import TDClient from tdçclients and mıllıseconds_since_epoch from td.utils. How can i fix it?
Your tutorials are great!!! Thank you!!!
Glad you like them!
again can i do this to any platform and i dont have knowledge about python but its amazing that the robot gets information from API and i cant even imagine how it does that.
quick question if anyone can answer:
Is there a library that has preset trading strategies or indicators anywhere on the net? or is this just something that all algo-traders have to build out themselves?
Is there anyway you can make the code that you’re typing visually larger. I travel a lot and I watch videos on my iPad. Consequently, the screen is much smaller and I have a very difficult time seeing what your typing. Besides, as far as I can tell, there’s nothing but a bunch of unused white screen to the right of your code anyway?
i cant download td-ameritrade, pandas and numpy with the setup.py?
does this bot apply to crypto aswell?
is it necessary to define the type of object every time you write it? that's new in python.
Thank you for sharing how to do this! I did want to ask if I want to trade futures on TD with the robot is it the same but with the futures ticker and what about the time? I currently trade futures on TD. Thanks again for your time.
What's TDA API pls, am a beginner.
Great video, thank you so much! I was thinking for pre_market, right now should not be equal to market_start_time and for post_market, not equal to market_end_time. What do you think?
Ok so I just realized that its not using MetaTrader 4 as a client. (I dont know why I was assuming it would I just did.) and I want to know if its compatible with MT4 or if there are any emendations we could do to make it use MT4.
This library isn't compatible with the Client you mentioned.
@@SigmaCoding Ok thanks alot. The sad part is I specifically searched for MT4 coding bot python. and this showed up. I was so excited. I got a bunch of amateurs in finance and coding together to work on this. Only to realize that its not in MT4. Theoretically speaking though. It is possible to take out the TD api and switch it with a MT4 api? as long as the all the connections calling for TD api are fullfilled in the new MT4 api? I am currently looking at your TD api to see everything that includes so I can include it in the new one. MT4 is also a trading market. Only it uses foreign exhange,
My td.client doesnt have TDClient inside of it, and i cant pip install td.utlis doesn't work
td.utils
@@allankanaiya3775 have you tried "pip install tdutils" ? or "pip3 install tdutils" ?
THANK YOU VERY MUCH IT'S REALLY INTERESTING
You are welcome!
_Is it possible to learn this power?_
Hi everyone! I was wondering, for the td.client, what do I need to pip install? Thanks!
If you pip install the trading robot library, it will install the TD library for you as well. It's in the setup.py file, so just run the pip install on the trading robot library.
@@SigmaCoding thank you! Question: does this also work on pycharm?
@@ishpen282 It should, but just be aware that PyCharm sets up the workspace environment a little differently than VS Code. People seem to run into issues when they try to run locally installed packages on PyCharm.
Hello!! I just wonder with some timestamps that you created!
I thought Stock Market in US following this schedule.
4:00 am to 9:30 am = pre market time
9:30 am to 4:00 pm = market time
4:00 pm to 8:00 pm = post market time
And i guess you setted time for pre market and post market less than those time. Maybe i have misunderstanding but could you give me reasons? ps, your lecture is just awesome!
So the timestamps you're seeing are in UTC time because I can't assume everyone would be in PST time. The best work around is to put it in UTC time. Does that answer your question?
@@SigmaCoding Great material here!!! I had the same question as Subin. I understood Subin's question as: should the pre_market be 8:00(UTC) to 13:30(UTC) which would be 4:00(EST) to 9:30(EST)? Then the same for post market at 20:00(UTC) to 24:00(UTC) which would be 16:00(EST) to 20:00(EST). This would be different for OTC and foreign markets.
I know you can’t assume that everyone will be in the same zone, but you don’t have to assume the users time zone for the US stock market because it’s in EST. So would it not just be easier to call the api from TD to check?
It would change depending on daylight savings time. 9.30AM Eastern = 2.30PM UTC or 1.30PM UTC so either 13:30 UTC or 14:30 UTC pre-market end / regular-market start depending on EST/EDT. Gets complicated fast :)
@@sanjeevpanicker9813 Thanks, Sanjeev. You've answered the question of why the UTC times in this video weren't matching up for me. Daylight savings is in effect now.
what does "td.client" mean?
could you do this on a jupyter notebook?
I mean you could run the robot using a Jupyter Notebook, but I wouldn't want to develop this library using a Jupyter Notebook. It would be unnecessarily difficult compared to Visual Studio Code.
Can I use it for other broker? Or only TDAmeritrade?
Right now, only TD Ameritrade, but there are plans to integrate Interactive Brokers at some point.
I keep getting "ERROR: Package 'python-trading-robot' requires a different Python: 3.7.6 not in '>=3.8'" anyone know how to fix this?
How would I get the utilities submodule from TD Ameritrade? I'm getting an error saying that this module can not be found.
If you're using the package hosted on PyPi, then run the following:
pip install --upgrade python-trading-robot
PLEASE DEAR ALEX HOW CAN I WRITE THE CODE SOO THE BOT CAN PLACE A BUY AND SELL TRADE AT THE SAME TIME WITH A 4 PIPS STOP LOSS IN PYTHON TNX UU IN ADVANCE
Could you go in dark mode in your editor in your tutorials? White background makes it difficult to see the text in your code editor
Will do.
How was you profit after using it for 5 months?
Thanks for the video! When importing td.utils I get the message: cannot import name 'milliseconds_since_epoch' from 'td.utils'. I tried unsuccessfully to pip install it. Any ideas to make it work?
for recent python versions you need these 2 lines instead (see github file)
from td.utils import TDUtilities
milliseconds_since_epoch = TDUtilities().milliseconds_since_epoch
How to install td.client???
thank you 🙏🏼
ImportError: cannot import name 'milliseconds_since_epoch' from 'td.utils'
same issue. didnt u solve it?
Love you :)
thank you
🙌🏼🙌🏼
Where is part 2?
This Video and ALL of the CONTENTS ARE OUT OF DATE AND CAN NOT WORK CORRECTLY.
Can this work in roblox?
lol
i think i might be the only one failing to actually follow