下面的代码,在飞狐、大交易师都能正常运行,但是在金魔方上运行有错误,请帮忙看看是哪儿的问题?
QkUp:=c;QkDown:=c;hh:=h;ll:=l;
Sh:=h;Sl:=l;
for i=0 to DataCount-1 do begin
if Sh<Sh[i-1] then Sh:=Sh[i-1];
if SL>Sl[i-1] then Sl:=Sl[i-1];
end;
for i=0 to datacount do begin
qkup=0;qkdown=0;end;
j:=0;i:=1;
while j<2 and i<datacount do begin
if ll>hh[i+1] and hh[i+1]<sl then begin QkUp:=-1;j:=j+1;end;
if hh<ll[i+1] and ll[i+1]>sh then begin QkDown:=-1;j:=j+1;end;
i:=i+1;
end;
UpE:=backset(islastbar,barslast(Qkup=-1)+1);
DownE:=backset(islastbar,barslast(QkDown=-1)+1);
BsQk:=barssince(UpE=1);BpQk:=barssince(DownE=1)+1;
upcr:=strtonum(numtostr(ref(barpos,BsQk),0));
downcr:=strtonum(numtostr(ref(barpos,BpQk),0));
RefL:=strtonum(numtostr(ref(l,BpQk),2));
refh:=strtonum(numtostr(ref(h,bpqk-1),2));
hhvsh:=strtonum(numtostr(hhv(sh,BpQk),2));
MaxDownL:=max(refh,hhvsh);
MaxDownH:=StrToNum(numtostr(ref(l,BpQk),2));
UpRefL:=StrToNum(NumToStr(ref(l,BsQk),2));
UpRefH:=StrToNum(NumToStr(ref(h,BsQk+1),2));
LlvSL:=StrToNum(NumToStr(LLV(sl,BsQk),2));
MinUpH:=min(UpRefL,LlvSL);
MinUpL:=UpRefH;
FILLRGN(barpos>Upcr and MinUpH>MinUpL and MinUpH<=SYSPARAM(4) and MinUpL>=SYSPARAM(5),MinUpH,MinUpL),ColorGray;作者: John 时间: 2013-4-18 15:27