variable:f=close;
if barpos<=2 then f:=close;
f1:=ref(f,1);
f2:=ref(f,2);
if barpos>=3 then f:=a+b*f1+c*f2