Professional Documents
Culture Documents
Super - Trend - Top
Super - Trend - Top
Super - Trend - Top
input
md(21);
exponential(true);
Var
m:float;
cont,i:integer;
dw:boolean;
begin
cont:=0;
if(exponential) then
m:=mediaexp(md,close)
else
m:=media(md,close);
i:=16;
while i>0 do
begin
i:=i-1;
if(LastCalcDate[i]<>LastCalcDate[i+1]) then
cont:=0
begin
dw:=false;
cont:=0;
//plot2(21);
end
begin
dw:=true;
cont:=0;
end;
cont:=cont+1;
end;
Plot(cont);
//plot2(close[i]);
//plot3(m[i]);
begin
if(dw) then
begin
SetPlotColor( 1,clfucsia);
paintbar(clfucsia);
end
else
begin
SetPlotColor( 1,claqua);
paintbar(claqua);
end;
end
begin
if(dw) then
begin
SetPlotColor( 1,clred) ;
paintbar(clred);
end
else
begin
SetPlotColor( 1,clgreen);
paintbar(clgreen);
end;
end
begin
SetPlotColor( 1,clamarelo);
paintbar(clamarelo);
end
else
begin
SetPlotColor( 1,clgray);
paintbar(clgray);
end ;
//plot4(m);
end;