- 金币:
-
- 奖励:
-
- 热心:
-
- 注册时间:
- 2008-8-11
|
|
求高手将飞狐三线源码转换为博易大师三线源码,please!
来自:MACD论坛(bbs.shudaoyoufang.com)
作者:JNSUNJIANBO
浏览:3267
回复:0
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
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;
QQ:125918832
|
|
|