%y=dlmread('Volkoiovcy.txt');
%y=dlmread('sin.txt');
y=dlmread('eurusd1440.txt');
x=0:1430;
y=transpose(y(1:1030));
for i=6:6
    %y=sin((2*pi/(30-i))*x)+200*ones(1,length(x));
    n=length(y);
    nprognoz=350;
    global type_prirash;
    type_prirash=1;
    global graphs;
    graphs=[];
    global graphs_raspr;
    graphs_raspr=[];
    global type_raspr;
    type_raspr=4;
    fprintf(1,'s=%d,prost,type=0_po_sost\n',i);
    yshito=test_skleyka(y,i,1);
    title(strcat('prostaya type=0_po_sost, i=',int2str(i)));
    figure;
    fprintf(1,'s=%d,slozhn,type=1_po_otkl\n',i);
    type_raspr=5;
    yshito=test_skleyka(y,i,1);
    title(strcat('Slozhn type=1_po_otklon, i=',int2str(i)));
end
%y=y+1000*ones(n,1);
y1=y(1:n-10);
global bif_flag;
bif_flag=1;
%bif_flag=[];
%params=MarkovPrognozOptimize(y1);
%[yprognall,N1]=MarkovPrognozMain(y(1:n-1000));

%figure;
%plot(y,'r');
%hold on;
%plot(params,'b');
%title('MainResults!'); 