def main(args): ticker = args['<ticker>'] num_days = args['<num_days>'] num_days = int(num_days) DJIA = 'djia' if ticker.upper() == DJIA.upper(): tickers = cn.get_djia_list() for i in range(len(tickers)): process_company(tickers[i], num_days, True, False) else: process_company(ticker, num_days, True, False)
def gui_call(ticker, days, spreadV, volumeV): num_days = days useSpread = False useVolume = False useAverage = False if (spreadV == 1): useSpread = True if (volumeV == 1): useVolume = True DJIA = 'djia' if ticker.upper() == DJIA.upper(): tickers = cn.get_djia_list() for i in range(len(tickers)): process_company(tickers[i], num_days, useSpread, useVolume) else: process_company(ticker, num_days, useSpread, useVolume)