We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I'm looking for a python script to draw candlestick plot inside a text user interface (ncurses or urwid).
Could you help me to do that ?
For now I've done a script which download from Yahoo Finance GOOG OHLCV data (and put data into a SQLite cache)
You need pandas, requests and requests-cache
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests import requests_cache expire_after = None #15*60 # expire_after=delay_second or None requests_cache.install_cache('req_cache', backend='sqlite', expire_after=expire_after) from StringIO import StringIO import pandas as pd def get_ohlcv_data(size, offset=0): url = "http://ichart.finance.yahoo.com/table.csv?s=GOOG" req = requests.get(url) #print(req.content) io = StringIO(req.content) df = pd.read_csv(io, sep=',', parse_dates=['Date']) df = df.rename(columns={ 'Date': 'date', 'Open': 'open', 'High': 'high', 'Low': 'low', 'Close': 'close', 'Volume': 'volume', 'Adj Close': 'adj close', }) df = df.set_index('date') df = df[offset:size+offset][::-1] return(df) def main(): df = get_ohlcv_data(50, 0) print(df) print(df.dtypes) inc = df['close'] > df['open'] dec = df['close'] < df['open'] if __name__ == "__main__": main()
An other sofware provide something similar http://prof7bit.github.io/goxtool/
but I really want to isolate plot to be standalone.
It will be nice if bashplotlib could provide such feature.
Kind regards
The text was updated successfully, but these errors were encountered:
haha cool i'll take a look
Sorry, something went wrong.
ideally it will be nice if it could be integrate as a widget into urwid using inheritance of widget http://urwid.org/reference/widget.html see speedometer example http://excess.org/speedometer/ so we could have events...
No branches or pull requests
Hello,
I'm looking for a python script to draw candlestick plot inside a text user interface (ncurses or urwid).
Could you help me to do that ?
For now I've done a script which download from Yahoo Finance
GOOG OHLCV data (and put data into a SQLite cache)
You need pandas, requests and requests-cache
An other sofware provide something similar
http://prof7bit.github.io/goxtool/
but I really want to isolate plot to be standalone.
It will be nice if bashplotlib could provide such feature.
Kind regards
The text was updated successfully, but these errors were encountered: