欢迎您光临花生网社区!
| |

 找回密码
 立即注册
查看: 4265|回复: 0
打印 上一主题 下一主题

求金魔方的开发人员帮忙! [复制链接]



Rank: 2

1#
发表于 2015-3-19 11:43:59 |显示全部楼层 | [分享到 腾讯微博 新浪微博]
本帖最后由 PTST 于 2015-3-19 12:01 编辑

序列变量和单值变量不分
  1. //variable: QkUp(0),QkDn(0);
  2. QkUp:=C;QkDn:=C;
  3. hh:=h;ll:=l;
  4. Sh:=h;Sl:=l;
  5. for i=0 to DataCount-1 do begin
  6.         if Sh[i]<Sh[i-1] then Sh[i]:=Sh[i-1];
  7.         if SL[i]>Sl[i-1] then Sl[i]:=Sl[i-1];
  8. end;
  9. for i=0 to datacount do begin QkUp[i]=0;QkDn[i]=0;end;
  10. j:=0;i:=1;
  11. while j<2 and i<datacount do begin
  12.         if ll[i]>hh[i+1] and hh[i+1]<sl[i] then begin QkUp[i]:=1;j:=j+1;end;
  13.         if hh[i]<ll[i+1] and ll[i+1]>sh[i] then begin QkDn[i]:=1;j:=j+1;end;
  14.         i:=i+1;
  15. end;
  16. blQkUp:=BarsLast(QkUp>0.5,2)+1;
  17. blQkDn:=BarsLast(QkDn>0.5,2)+1;
  18. UpE:=backset(islastbar,blQkup);
  19. DnE:=backset(islastbar,blQkDn);
  20. BsQk:=barssince(UpE=1);
  21. BpQk:=barssince(DnE=1)+1;
  22. UpCr:=strtonum(numtostr(ref(barpos,BsQk),0));
  23. DnCr:=strtonum(numtostr(ref(barpos,BpQk),0));
  24. RefL:=strtonum(numtostr(ref(l,BpQk),2));
  25. Refh:=strtonum(numtostr(ref(h,bpqk-1),2));
  26. hhvsh:=strtonum(numtostr(hhv(sh,BpQk),2));
  27. MaxDnL:=max(Refh,hhvsh);
  28. MaxDnH:=StrToNum(numtostr(ref(l,BpQk),2));
  29. UpRefL:=StrToNum(NumToStr(ref(l,BsQk),2));
  30. UpRefh:=StrToNum(NumToStr(ref(h,BsQk+1),2));
  31. LlvSL:=StrToNum(NumToStr(LLV(sl,BsQk),2));
  32. MinUpH:=min(UpRefL,LlvSL);
  33. MinUpL:=UpRefh;
  34. FILLRGN(barpos>UpCr and MinUpH>MinUpL and MinUpH<=SYSPARAM(4) and MinUpL>=SYSPARAM(5),MinUpH,MinUpL),ColorGray;
  35. FILLRGN(barpos>DnCr and MaxDnL<MaxDnH and MaxDnH<=SYSPARAM(4) and MaxDnL>=SYSPARAM(5),MaxDnH,MaxDnL),ColorGray;
复制代码运行代码



使用道具 举报

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


bottom

Archiver|www.hs633.com ( 粤ICP备11107430号 )

GMT+8, 2024-5-18 19:32 , Processed in 0.085939 second(s), 9 queries .

花生网 Copyright©2012-2014

回顶部