import pandas as pd
import numpy as np
import os
#from ta import ichimoku
from util import get_data, plot_data

from pandas import DataFrame, Series
from technical_analysis import ichimoku
from datetime import datetime, timedelta,date
import os
import time
import sys
import getopt,argparse


def test_run(stock='000725'):

	duration = 360
	#now=datetime.now()
	today=date.today()
	ndays_ago=today-timedelta(duration)
	#print(str(n)+" days ago:\n"+str(ndays_ago))
	start_date=str(ndays_ago)
	end_date =str(today)


	df = get_data(stock,start_date, end_date)
	plot_data(df,ichimoku(df['close']),title=stock)


def usage():
	print (sys.argv[0] + ' -s stock id')
	

if __name__ == '__main__':
	opts, args = getopt.getopt(sys.argv[1:], "s:")
	stock_list=''
	single_stock=False
	stock_selected="002281"
	for op, value in opts:
		if op == '-s':
			stock_selected = value
		elif op == '-h':
			usage()
			sys.exit()
	
	test_run(stock_selected)
@@ -285,17 +285,34 @@
 gparse%0A%0A
+MAX_ROLLING = 100
 %0A
-
 def test
@@ -430,54 +430,20 @@
 tion
-)%0A%09#print(str(n)+%22 days ago:%5Cn%22+str(ndays_ago)
++MAX_ROLLING
 )%0A%09s
@@ -547,16 +547,30 @@
 _data(df
+%5BMAX_ROLLING:%5D
 ,ichimok
@@ -583,16 +583,30 @@
 close'%5D)
+%5BMAX_ROLLING:%5D
 ,title=s
@@ -940,8 +940,9 @@
 elected)
+%0A

Add the missing data for ichimoku with additional data fed