df1=get_price('600779.XSHG',end_date='2018-05-19', frequency='1m', fields='avg', skip_paused=False, fq='none', count=240)
df2=get_price('600779.XSHG',end_date='2018-05-19', frequency='1m', fields=['volume','money'], skip_paused=False, fq='none', count=240)
import pandas as pd
series1=df1['avg']
series2=df2['money']/df2['volume']
avg_df=pd.DataFrame({'avg1':series1[:-1],'avg2':series2[:-1]})
avg_df = avg_df.reset_index(drop=True)
avg_df = avg_df.cumsum().apply(lambda x: x/(avg_df.index+1.0))
# avg_df['走势']=df1['avg'].values[:-1]
avg_df.plot()