Getting Weekly Graph
Opened this issue · 3 comments
josyjr25 commented
Hi daily graph are fine but Weekly graph are creating with error and cannot be opened
d3an commented
Can you attach your code?
josyjr25 commented
Hi:
here is the Code:. With daily the png files are OK with weekly or
monthly the .png files are corrupted. I have a feeling that FINVIZ is not
allowing to get to those chart
#!/usr/bin/python3
!pip install finviz~=1.4.4
from finviz.screener import Screener
from finviz.screener import Screener
import os
import datetime
Current_Date = datetime.datetime.today().strftime ('%d-%b-%Y')
# Create the Folder where the data ancharts are going to be stores
newpath = 'D:\\Users\\Jose
Mizrahi\\Documents\\finviz-master\\finviz-master\\'+'Breakout1
'+str(Current_Date)+'\\'
if not os.path.exists(newpath):
os.makedirs(newpath)
# Get dict of available filters
# filters dict contains the corresponding filter tags
filters = Screener.load_filter_dict()
filters = [
"cap_small",
"fa_sales5years_pos",
"sh_curvol_o200",
"sh_relvol_o1",
"ta_highlow52w_b0to10h",
"ta_sma50_pa",
"ta_volatility_mo3&ft=4&o=ticker"
]
stock_list = Screener(filters=filters, table="Performance")
print(stock_list)
# Monthly, Candles, Large, No Technical Analysis
stock_list.get_charts(period='w', chart_type='c', size='l', ta='1')
# period='d' > daily
# period='w' > weekly
# period='m' > monthly
# chart_type='c' > candle
# chart_type='l' > lines
# size='m' > small
# size='l' > large
# ta='1' > display technical analysis
# ta='0' > ignore technical analysis
print("Retrieving stock data...")
stock_data = stock_list.get_ticker_details()
print(stock_data)
os.chdir(newpath)
# Export the screener results to CSV file
stock_list.to_csv("JosyBreakout1.csv")
# Create a SQLite database
# stock_list.to_sqlite("sp500.sqlite")
El mar, 2 ago 2022 a las 12:17, James Bury ***@***.***>)
escribió:
… Can you attach your code?
—
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYXWWE773NR4HCPFXH4SNNLVXFJZFANCNFSM55DYNFJA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
josyjr25 commented
Hi, here is it
Thanks
José
El mar, 2 ago 2022 a las 12:17, James Bury ***@***.***>)
escribió:
… Can you attach your code?
—
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYXWWE773NR4HCPFXH4SNNLVXFJZFANCNFSM55DYNFJA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>