Python Charting Stocks/Forex for Technical Analysis Part 4 - Automating stock prices | Forex
Information | Currency | Markets | Fx | Video | Assets | Lesson | Trading
Charting Stocks in Python playlist: http://www.youtube.com/watch?v=u6Xd3kRHhJI&feature=share&list=PLQVvvaa0QuDcR-u9O8LyLR7URiKuW-XZq This is the fourth video in the series for stock price analysis, showing how to automatically pull stock price data. This is continued in the 5th video. The purpose of the videos in this series is to teach you how to program your own charting and analysis of stocks or Forex. This is beneficial for you if you plan to do any sort of algorithmic, high-frequency, or any sort of automated trading. Sentdex.com Facebook.com/sentdex Twitter.com/sentdex
Comments
-
Is it somehow possible to stream live data from MetaTrader4 into a algo?
-
Hi Sentdex,great video series, thank you. I just have one question, what URL do I use if I'm trying to pull Forex, not stock data?
-
love the vids, extremely helpful
you should do a vid series where you clone a shitcoin (altcoin) -
Sentdex,
Super man! Super video!!!
Is it posiable to share the source code of the series for stock price analysis,so far we only found the video in your site, if you can share them, it's really great for me to learn python easy. -
Great Videos
-
Hi, Just a small question. At 14:07, you say that python will fail if the file does not exist. But isn't it the case that the open command creates a new file if the file does not exist?
-
why haven't you simply used:
print str(time.strftime('%Y-%m-%d %H:%M:%S',)) -
Hi Sentdex, really enjoy your videos! Unfortunately, I keep running into this invalid syntax error on the urltovisit line : File "<ipython-input-16-aa8eac7f2667>", line 11
urltovisit (=) 'http://chartapi.finance.yahoo.com/instrument/1.0/'+stock+'/chartdata;type=quote;range=1y/csv'
^
SyntaxError: invalid syntax
I have tried everything and I can't seem to get it to work. -
The following line is a bit shorter:
print datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') -
I've tried this on windows and linux, using python 2.7.3, but I always get the same error: "main loop can only concatenate tuple (not "str") to tuple"
Seems like all the uses of stock+".txt" or stock+"some text" anywhere in that function makes python choke. Is there some clever way to cast the tuple as a string? Any advice would be awesome, thanks! -
You forgot to put the ichart url in the description :). I found the following URL, while not as fast, will get you daily historical data for the life of the security(replace '[TICKER]' with the ticker (and of course you can change the start/end dates): 'http://ichart.finance.yahoo.com/table.csv?s=[TICKER]&a=01&b=01&c=1900'
Greetings from a fellow Texan!
Iv'e found your channel very helpful in my python learning endeavors. I was trying to replicate this program in python 3.5.1 and have been getting a weird error that I can not figure out. I understand that these videos are a few years old but any help would be greatly appreciated. I'll paste the error below that I need help with.
Traceback (most recent call last):
File "/Users/jeff/Documents/StockPullerTest.py", line 30, in <module>
pullData(stockToPull)
File "/Users/jeff/Documents/StockPullerTest.py", line 10, in pullData
fileLine = stock+ '.txt'
TypeError: can only concatenate tuple (not "str") to tuple
>>>