function vykresli_ma(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.
window_size = 2;


dates = dates_enter;
data = hist_enter;


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

price = fints(dates, data)

%Calculate the simple moving average.
simpless = tsmovavg(price,'s',window_size);
%Calculate the exponential weighted moving average moving average.
exp = tsmovavg(price,'e',window_size);
%Calculate the triangular moving average moving average.
tri = tsmovavg(price,'t',window_size);
%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);
%Calculate the modified moving average moving average.
modif = tsmovavg(price,'m',window_size);
%Plot the results for the five moving average calculations for Disney stock.
%plot(price,...
 %   simpless,...
  %  exp,...
   % tri,...
    %weighted,...
    %modif)
%h1 = figure    
%p1 = plot(price)
%hold on

h2 = figure
title('Disney Weekly Price & Moving Averages')
p2 = plot(simpless,'r')
set(p2,'LineWidth', 2)
hold on
plot(price, 'k')

h3 = figure
title('Disney Weekly Price & Moving Averages')
p3 = plot(exp, 'g')
set(p3,'LineWidth',2)
hold on
plot(price, 'k')

h4 = figure
title('Disney Weekly Price & Moving Averages')
p4 = plot(tri, 'b')
set(p4,'LineWidth',2)
hold on
plot(price, 'k')

h5 = figure
title('Disney Weekly Price & Moving Averages')
p5 = plot(weighted, 'm')
set(p5,'LineWidth',2)
hold on
plot(price, 'k')

h6 = figure
title('Disney Weekly Price & Moving Averages')
p6 = plot(modif, 'y')
set(p6,'LineWidth',2)
hold on
plot(price, 'k')

%plot(dates, price,...
 %   dates,simpless)
%datetick
%legend('Stock Price','Simple','Exponential','Triangular','Weighted', 'Modified','Location','NorthWest')
%title('Disney Weekly Price & Moving Averages')

hold on