function drawWeighted(dates_enter, hist_enter)

%Load the financial time series object, dis for Disney stock and look at the weekly data for this time series.
%load disney.mat
%weekly = toweekly(dis);
%dates = (weekly.dates);
%price = fts2mat(weekly.CLOSE);
%Set the|lag| input argument for the window size for the moving average


dates = dates_enter;
data = hist_enter;


%price = fts2mat(fints(dates, data));
%pom = fints(dates, data);
%price = fts2mat(pom);

price = fints(dates, data)

%Calculate the weighted moving average moving average.
semi_gaussian = [0.026 0.045 0.071 0.1 0.12 0.138];
semi_gaussian = [semi_gaussian fliplr(semi_gaussian)];
weighted = tsmovavg(price,'w',semi_gaussian);
p5 = plot(weighted, 'm')
legend(p5, 'Weighted moving average')
set(p5,'LineWidth',2)
hold on


NumTicks = 18;
L = get(gca,'XLim');

set(gca,'XTick',linspace(L(1),L(2),NumTicks))

% set(get(gca,'XLabel'),'Rotation',270)
dateaxis('x', 2)