support type error when plot, and moreover how to animate this plot

restart;

with(ExcelTools):

with(ListTools):

with(DynamicSystems):

filename := "0257.HK";

open3 := Import(cat(cat("C://Temp//HK//Bank//",filename),".xls"), filename, "B2:B100");

high3 := Import(cat(cat("C://Temp//HK//Bank//",filename),".xls"), filename, "C2:C100");

low3 := Import(cat(cat("C://Temp//HK//Bank//",filename),".xls"), filename, "D2:D100");

close3 := Import(cat(cat("C://Temp//HK//Bank//",filename),".xls"), filename, "E2:E100");

with(CurveFitting):

n := 31;

f := Vector(n);

f2 := Vector(n);

open2 := Vector(n);high2 := Vector(n);gain2 := Vector(n);algebra2 := Vector(n);creative2 := Vector(n);creative3 := Vector(n);

upper2 := Vector(n);lower2 := Vector(n);upperloweratio := Vector(n);

deltaopen2 := Vector(n); deltahigh2 := Vector(n); deltalow2 := Vector(n); deltaclose2 := Vector(n);

logn := Vector(n);

for i from 0 to n-4 do

open2[i+1] := PolynomialInterpolation([[0,open3[n-i][1]],[1,open3[n-(i+1)][1]],[2,open3[n-(i+2)][1]],[4,open3[n-(i+3)][1]]],t):

high2[i+1] := PolynomialInterpolation([[0,high3[n-i][1]],[1,high3[n-(i+1)][1]],[2,high3[n-(i+2)][1]],[4,high3[n-(i+3)][1]]],t):

low2[i+1] := PolynomialInterpolation([[0,low3[n-i][1]],[1,low3[n-(i+1)][1]],[2,low3[n-(i+2)][1]],[4,low3[n-(i+3)][1]]],t):

if (close3[i+1][1]/close3[i+2][1]-1) < 0 then

gain2[i+1] := -1*round(100*abs(close3[i+1][1]/close3[i+2][1]-1)):

else

gain2[i+1] := round(abs(100*(close3[i+1][1]/close3[i+2][1]-1))):

end if;

od;

n := 31;

newclose := Vector(n);

for j from 0 to n-4 do

for i from 0 to n-4 do

x1 := close3[i+1];

y1 := close3[i+1];

newclose[i+1] := subs(y=y1, subs(x=x1, (1/2)*(-y+sqrt(-3*y^2-4*y*x))/y))

od;

close3 := newclose;

plot(close3(x), x=1..31);

od;