//万科在指定区间内的上涨下跌情况;
setsysparam(pn_stock(),'SZ000002');
end_date := inttodate(20110909);
beg_date := IncWeek(end_date,-1); //end_date 前推一个
r := array();
i := 0;
for d := end_date downto beg_date do
begin
if not istradeday(d) then continue;
setsysparam(pn_date(),d);
r[i]['date'] := datetostr(d);
if IsUp() then r[i]['ud_state'] := '涨';
else if IsDown() then r[i]['ud_state'] := '跌';
else if IsEqual() then r[i]['ud_state'] := '平';
i++;
end;
return r;
返回结果如下图:
IsDown IsEqual