当前位置:→ 股海网飞狐公式 → 正文
  • 飞狐箱体主图指标

  • 相关简介:飞狐箱体主图指标 源码 DRAWGBK(1, COLORRGB(100,100,100),COLORRGB(50,50,50),0); {-----------------------☆功能开关------------------------} {箱体部分} cc:=c; oo:=o; hh:=h; ll:=l; top:=h; bot:=l; xx[1]:=1; kk:=1; for i=1 to datacount do begin if xx[i]=1 then begin top[i]

  • 文章来源:股海网作者:股海网发布时间:2016-06-03浏览次数:下载次数:0收藏:

飞狐箱体主图指标

源码

DRAWGBK(1, COLORRGB(100,100,100),COLORRGB(50,50,50),0);

{-----------------------☆功能开关------------------------}
{箱体部分}
cc:=c;
oo:=o;
hh:=h;
ll:=l;
top:=h;
bot:=l;
xx[1]:=1;
kk:=1;
for i=1 to datacount do begin
  if xx[i]=1 then begin
    top[i]:=hh[i];
  end;
  if xx[i-1]=1 then begin
    if hh[i]>top[i-1] then begin
      top[i]:=hh[i];
      xx[i]:=1;
    end;else begin
      top[i]:=top[i-1];
      xx[i]:=2;
      end;
  end;
  if xx[i-1]=2 then begin
    if hh[i]>top[i-1] then begin
      top[i]:=hh[i];
      xx[i]:=1;
    end;else begin
      top[i]:=top[i-1];
      bot[i]:=ll[i];
      xx[i]:=3;
    end;
  end;
  if xx[i-1]=3 then begin
    top[i]:=top[i-1];
    if ll[i]<bot[i-1] then begin
      bot[i]:=ll[i];
      xx[i]:=3;
    end;else begin
      bot[i]:=bot[i-1];
      xx[i]:=4;
    end;
  end;
  if xx[i-1]=4 then begin
    top[i]:=top[i-1];
    if ll[i]<bot[i-1] then begin
      bot[i]:=ll[i];
      xx[i]:=3;
    end;else begin
      bot[i]:=bot[i-1];
      xx[i]:=5;
    end;
  end;
  if xx[i-1]=5 then begin
      if ll[i]<bot[i-1] or hh[i]>top[i-1] then begin
      top[i]:=hh[i];
      bot[i]:=hh[i];
      xx[i]:=1;
      end;else begin
      bot[i]:=bot[i-1];
      top[i]:=top[i-1];
      xx[i]:=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;
中位线:=(top+bot)/2;

{信号部分---参考}
买点:=FILTER((TROUGHBARS(3,15,1)<4)=1,3);
卖点:=FILTER((PEAKBARS(3,15,1)<4)=1,3); 
{短波--未来}
F:=100*(C-REF(C,1))/REF(C,1);
p1:=IF(C<REF(O,1) AND f<0,1,0);
p3:=IF(C>REF(O,1) AND f>0,1,0);
p2:=IF(C<REF(O,2) AND f<0,1,0);
p4:=IF(C>REF(O,2) AND f>0,1,0);
买D5:=P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1;
卖D6:=P3=0 AND REF(P3,1)=1 AND P4=0 AND REF(P4,1)=1;
FZ:=PEAK(3,5,1);
FW:=PEAKBARS(3,5,1);
GZ:=TROUGH(3,5,1);
GW:=TROUGHBARS(3,5,1);
AS:=ZIG(3,3); 
涨AL:=CROSS(AS,REF(AS,1));
跌AG:=CROSS(REF(AS,1),AS);
Ss1:=IF(FW>GW,FW,0);
Ss2:=IF(FW<GW,GW,0);
Ss3:=BARSLAST(Ss1);
Ss4:=BARSLAST(Ss2);

{-----------------【图解模板】---------------------};
{箱体部分}
PARTLINE(top=ref(top,1),top),Color008293;//箱顶
PARTLINE(bot=ref(bot,1),bot),Color008293;//箱底
STICKLINE((top<>ref(top,1) or bot<>ref(bot,1)) and xx=1 and ref(xx,1)=5,top,bot,1,0),Color008293;//左侧竖线
STICKLINE((top<>refx(top,1) or bot<>refx(bot,1)) and xx=5 and refx(xx,1)=1,top,bot,1,0),Color008293;//右侧竖线
{K线}
STICKLINE(cc>oo,cc,oo,8,1),color5454ff;
STICKLINE(cc>oo,ll,oo,0.9,1),color5454ff;
STICKLINE(cc>oo,hh,cc,0.9,1),color5454ff;
STICKLINE(cc<oo,cc,oo,8,0.5),ColorFFA800;
STICKLINE(cc<oo,hh,ll,0.9,0.5),ColorFFA800;
{信号部分---参考}
{未来}
STICKLINE(买点,L,(O+C)/2,0,0),COLORWHITE; {未来买点}
STICKLINE(买点,C,(O+C)/2,5,0),COLORWHITE; {未来买点}
STICKLINE(卖点,H,(O+C)/2,0,0),COLORYELLOW;{未来卖点}
STICKLINE(卖点,C,(O+C)/2,5,0),COLORYELLOW;{未来卖点}
{短波--未来}
STICKLINE(买D5 and 涨AL,L,(O+C)/2,0,0),COLORWHITE; {未来买}
STICKLINE(买D5 and 涨AL,O,(O+C)/2,5,0),COLORWHITE; {未来买}
STICKLINE(卖D6 and 跌AG,L,(O+C)/2,0,0),Color3EA63E;{未来卖}
STICKLINE(卖D6 and 跌AG,O,(O+C)/2,5,0),Color3EA63E;{未来卖}
{短波--未来--画线写字}
DRAWLINE(FW=0,FZ,GW=0 or ISLASTBAR,REF(FZ,FW),0),Color02A800;   //未来--转跌
DRAWLINE(GW=0,GZ,FW=0 or ISLASTBAR,REF(GZ,GW),0),COLORMAGENTA;  //未来--转涨
DRAWTEXT(BARPOS=SYSPARAM(2),h,'■上涨第'+NUMTOSTR(Ss4[SYSPARAM(1)],0)+'天'),align4,COLORMAGENTA;//未来
DRAWTEXT(BARPOS=SYSPARAM(2),h,' \n■下跌第'+NUMTOSTR(Ss3[SYSPARAM(1)],0)+'天'),align4,COLORCYAN;//未来
{箱体部分}
PARTLINE(top=ref(top,1),中位线),LINEDOT,Color008293;//中位线

飞狐箱体主图指标

问题反馈

飞狐箱体主图指标

  • 下载资源所需积分

    0

  • 当前拥有积分

    0

上传会员: 
股海网
文件大小: 
Bytes
上传时间: 
2016-06-03
下载积分: 
-
免责声明: 
请仔细阅读并同意后才能下载
本附件为用户分享上传,股海网没有对文件进行验证,不能保证下载资源的准确性、安全性和完整性,也不保证下载资源能正常安装和使用,且下载后扣除的积分无法退还,除非您充分理解并完全接受本声明,否则您无权下载。
本站对提供下载的软件、指标、资料等不拥有任何权利,其版权归该下载资源的合法拥有者所有。本附件仅供学习和研究使用,不得用于商业或者非法用途,如有侵犯您的版权, 请参看 《股海网侵权处理流程》《股海网免责声明条款》
点击下载无反应时,更换主流浏览器重新登录操作,如360浏览器、Edge浏览器、谷歌浏览器,个别浏览器有不兼容现象。
勾选以下表示您已经阅读并同意以上声明才能下载本文件,扣除积分无法退还!
我已阅读所有条款规定, 请点我同意 所有条款内容!我自愿下载!
提示:如下载失败,请点关闭刷新此页面或提交问题反馈给管理员→
关闭

关于我们 - 联系我们 - 隐私政策 - 免责声明 - 下载帮助 - 广告合作 - SiteMap - TOP
增值电信业务经营ICP许可证:湘B2-20210269 湘ICP备09016573号-10 湘公网安备43108102000040号
Copyright © 2021 铭网科技,All Rights Reserved.