
等级: 新手上路
- 注册:
- 2023-2-7
- 曾用名:
|
VARIABLE: fc:=close,fh:=h,fl:=l,fcolor:=0,ft1:=0,fb1:=0,fi:=0,t[4]=0,b[4]=0,pt=1,pb=1;
if datacount<2 then exit;
for i=1 to 4 do begin
t:=i;
b:=1;
end
for i=2 to datacount do begin
if fc>fc[t[pt]] then begin
fh:=fc;
fl:=fc[t[1]];
fcolor:=1;
b[4]:=b[3];
b[3]:=b[2];
b[2]:=b[1];
b[1]:=t[1];
t[4]:=t[3];
t[3]:=t[2];
t[2]:=t[1];
t[1]:=i;
pt:=1;
pb:=if(pb=3,3,pb+1);
end
else if fc<fc[b[pb]] then begin
fh:=fc[b[1]];fl:=fc;
fcolor:=-1;
t[4]:=t[3];
t[3]:=t[2];
t[2]:=t[1];
t[1]:=b[1];
b[4]:=b[3];
b[3]:=b[2];
b[2]:=b[1];
b[1]:=i;
pb:=1;
pt:=if(pt=3,3,pt+1);
end
else if fc<=fc[t[pt]] and fc>=fc[b[pb]] then begin
fh:=fh[i-1];
fl:=fl[i-1];
fcolor:=fcolor[i-1];
end
ft1:=t[1];
fb1:=b[1];
fi:=i;
end
STICKLINE(fcolor=1,fh,fl,10,0),colorred;
STICKLINE(fcolor=-1,fh,fl,10,0),colorgreen;
以上为飞狐源码,如何修改为金字塔可用,谢谢。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?
x
|