设为首页收藏本站

 找回密码
 注册
查看: 2379|回复: 1
打印 上一主题 下一主题

请转换为TB [复制链接]

Rank: 2

精华
0
UID
1084
积分
64
帖子
17
主题
7
阅读权限
30
注册时间
2008-1-16
最后登录
2013-3-22
跳转到指定楼层
1#
发表于 2008-6-18 10:07:49 |只看该作者 |倒序浏览
hh:=h;ll:=l;
top:=h;
bot:=l;
xx[1]:=1;
kk:=1;
for i=1 to datacount do begin
if xx=1 then begin
top:=hh;
end;
if xx[i-1]=1 then begin
if hh>top[i-1] then begin
top:=hh;
xx:=1;
end;else begin
top:=top[i-1];
xx:=2;
end;
end;
if xx[i-1]=2 then begin
if hh>top[i-1] then begin
top:=hh;
xx:=1;
end;else begin
top:=top[i-1];
bot:=ll;
xx:=3;
end;
end;
if xx[i-1]=3 then begin
top:=top[i-1];
if ll< bot [i-1] then begin
bot:=ll;
xx:=3;
end;else begin
bot:=bot[i-1];
xx:=4;
end;
end;
if xx[i-1]=4 then begin
top:=top[i-1];
if ll<bot [i-1] then begin
bot:=ll;
xx:=3;
end;else begin
bot:=bot[i-1];
xx:=5;
end;
end;
if xx[i-1]=5 then begin
if ll<bot [i-1] or hh > top[i-1] then begin
top:=hh;
bot:=hh;
xx:=1;
end;else begin
bot:=bot[i-1];
top:=top[i-1];
xx:=5;
end;
end;
end;
for j=1 to datacount do begin
if xx[j]=5 and xx[j-1]=4 then begin
for k=j-1 downto j-kk do begin
top[k]:=top[j];
bot[k]:=bot[j];
end;
end;
if xx[j-1]=5 and xx[j]=1 then kk:=0;
kk:=kk+1;
end;

Rank: 5Rank: 5

精华
0
UID
1263
积分
1151
帖子
199
主题
70
阅读权限
60
注册时间
2008-3-3
最后登录
2008-7-21
2#
发表于 2008-6-18 14:01:17 |只看该作者
真够复杂的啊!。。。。
欢迎加入交易开拓者QQ群:38529330,让我们一起交流,一起提高,一起赚钱吧。。。

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

bottom

静态版|手机版|联系我们|交易开拓者 ( 粤ICP备07044698   

GMT+8, 2024-5-23 19:58

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部