公式网 股票指标公式源码分享 登录 注册
公式指标平网
未来函数检测
首页 金钻指标 通达信公式 大智慧公式 同花顺公式 文华财经公式 东财通公式 飞狐公式 操盘手公式 其他公式 公式解答 股票软件 股票池
当前位置:→ 公式网 > 飞狐公式 > 正文 → 正文

飞狐主图:价量时空

发布时间:2009/10/9 19:06:06  浏览次数:

飞狐主图:价量时空

 

C/C++ Code复制内容到剪贴板
  1. 公式含有未来函数!   
  2.   
  3. 源码:   
  4.   
  5. INPUT:N(5);   
  6. a0:=BARSCOUNT(c);a3:=SYSPARAM(3);a2:=SYSPARAM(2);   
  7. a4:=SYSPARAM(4);a5:=SYSPARAM(5);   
  8. nn0:=a3-a2;nn:=a0-a2;hh1:=(a4-a5)/10;   
  9. y0:=a0>=a2;vv0:=if(y0=1 and SYSPARAM(1)>=a0,v,0);   
  10. c1:=if(BETWEEN(c,a4-0*hh1,a4-1*hh1),vv0,0);   
  11. c2:=if(BETWEEN(c,a4-1*hh1,a4-2*hh1),vv0,0);   
  12. c3:=if(BETWEEN(c,a4-2*hh1,a4-3*hh1),vv0,0);   
  13. c4:=if(BETWEEN(c,a4-3*hh1,a4-4*hh1),vv0,0);   
  14. c5:=if(BETWEEN(c,a4-4*hh1,a4-5*hh1),vv0,0);   
  15. c6:=if(BETWEEN(c,a4-5*hh1,a4-6*hh1),vv0,0);   
  16. c7:=if(BETWEEN(c,a4-6*hh1,a4-7*hh1),vv0,0);   
  17. c8:=if(BETWEEN(c,a4-7*hh1,a4-8*hh1),vv0,0);   
  18. c9:=if(BETWEEN(c,a4-8*hh1,a4-9*hh1),vv0,0);   
  19. c10:=if(BETWEEN(c,a4-9*hh1,a4-10*hh1),vv0,0);   
  20. v1:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c1,nn0),0),2));   
  21. v2:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c2,nn0),0),2));   
  22. v3:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c3,nn0),0),2));   
  23. v4:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c4,nn0),0),2));   
  24. v5:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c5,nn0),0),2));   
  25. v6:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c6,nn0),0),2));   
  26. v7:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c7,nn0),0),2));   
  27. v8:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c8,nn0),0),2));   
  28. v9:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c9,nn0),0),2));   
  29. v10:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c10,nn0),0),2));   
  30. av0:=max(v1,max(v2,max(v3,max(v4,max(v5,max(v6,max(v7,max(v8,max(v9,v10)))))))));   
  31. FILLRGN(v1/av0>=nn/nn0 and nn>=0,a4-0*hh1,a4-1*hh1+0.05),colormagenta;   
  32. FILLRGN(v2/av0>=nn/nn0 and nn>=0,a4-1*hh1,a4-2*hh1+0.05),colormagenta;   
  33. FILLRGN(v3/av0>=nn/nn0 and nn>=0,a4-2*hh1,a4-3*hh1+0.05),colormagenta;   
  34. FILLRGN(v4/av0>=nn/nn0 and nn>=0,a4-3*hh1,a4-4*hh1+0.05),colormagenta;   
  35. FILLRGN(v5/av0>=nn/nn0 and nn>=0,a4-4*hh1,a4-5*hh1+0.05),colormagenta;   
  36. FILLRGN(v6/av0>=nn/nn0 and nn>=0,a4-5*hh1,a4-6*hh1+0.05),colormagenta;   
  37. FILLRGN(v7/av0>=nn/nn0 and nn>=0,a4-6*hh1,a4-7*hh1+0.05),colormagenta;   
  38. FILLRGN(v8/av0>=nn/nn0 and nn>=0,a4-7*hh1,a4-8*hh1+0.05),colormagenta;   
  39. FILLRGN(v9/av0>=nn/nn0 and nn>=0,a4-8*hh1,a4-9*hh1+0.05),colormagenta;   
  40. FILLRGN(v10/av0>=nn/nn0 and nn>=0,a4-9*hh1,a4-10*hh1+0.05),colormagenta;   
  41.   
  42. hh:=SYSPARAM(4);ll:=SYSPARAM(5);   
  43. x:=ll-(hh-ll+MINDIFF)/n;   
  44. y:=HHV(VOL,SYSPARAM(3)-SYSPARAM(2)+1);   
  45. yvb:=y[SYSPARAM(3)]/(ll-x+MINDIFF);   
  46. z:=VOL/yvb+x;   
  47. STICKLINE(CLOSE>REF(CLOSE,1),x,z,7,1),Color0000FF;   
  48. STICKLINE(CLOSE<=REF(CLOSE,1),x,z,7,0),ColorEAE000;   
  49. 五日:MA(z,5);   
  50. 十日:MA(z,10);   
  51.   
  52. DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,{STKNAME+'\n'+STKLABEL+'\n'+}BLKNAME)align4,COLORGREEN;    
  53.   
  54.   
  55. STICKLINE(C>=O,C,O,7,0),COLORRED;   
  56. STICKLINE(C>=O,C,O,4,0),COLORB0B0FF;   
  57. STICKLINE(C>=O,C,O,2,0),COLORYELLOW;   
  58. STICKLINE(C>=O,H,L,0,0),COLORYELLOW;   
  59. STICKLINE(C<=O,C,O,7,0),COLORFF2020;   
  60. STICKLINE(C<=O,C,O,4,0),COLORFF6600;   
  61. STICKLINE(C<=O,C,O,2,0),COLORCYAN;   
  62. STICKLINE(C<=O,H,L,0,0),COLORCYAN;   
  63.   
  64.   
  65. 博弈线:=WMA(CLOSE,8),linethick3;   
  66. byx:=WMA(CLOSE,8),linethick3;   
  67. FILLRGN(byx>ref(byx,1),byx,ref(byx,1)),COLORRED;   
  68. FILLRGN(byx<ref(byx,1),byx,ref(byx,1)),COLORgreen;   
  69. Var1:=SYSPARAM(3)-SYSPARAM(2)+1;   
  70. Var2:=SYSPARAM(3)-BARPOS;   
  71. Var3:=HHV(HIGH,Var1);   
  72. Var4:=LLV(LOW,VaR1);   
  73. Var5:=REFX(Var3,Var2); //主图最高价   
  74. Var5:IF(SYSPARAM(3)<>SYSPARAM(1),SYSPARAM(6),Var5),COLORRED,POINTDOT;   
  75. Var6:REFX(Var4,Var2),COLORWHITE,POINTDOT;  //主图最低价   
  76. 黄191:(Var5-Var6)*0.191+Var6,COLORYELLOW,POINTDOT;   
  77. 黄382:(Var5-Var6)*0.382+Var6,COLORYELLOW,POINTDOT;   
  78. 黄500:(Var5-Var6)*0.500+Var6,COLORGREEN,POINTDOT;   
  79. 黄618:(Var5-Var6)*0.618+Var6,COLORYELLOW,POINTDOT;   
  80. 黄809:(Var5-Var6)*0.809+Var6,COLORYELLOW,POINTDOT;   
  81. A:=LOW=LLV(LOW,240);   
  82. A1:=BARSLAST(A);   
  83. VERTLINE(A1=30);   
  84. VERTLINE(A1=60);   
  85. VERTLINE(A1=90);   
  86. VERTLINE(A1=120);   
  87. VERTLINE(A1=150);   
  88. VERTLINE(A1=180);   
  89. VERTLINE(A1=210);   
  90. VERTLINE(A1=2400);   
  91. DRAWTEXT(A1=30,HIGH,'第一时间');   
  92. DRAWTEXT(A1=60,HIGH,'第二时间');   
  93. DRAWTEXT(A1=90,HIGH,'第三时间');   
  94. DRAWTEXT(A1=120,HIGH,'第四时间');   
  95. DRAWTEXT(A1=150,HIGH,'第五时间');   
  96. DRAWTEXT(A1=180,HIGH,'第六时间');   
  97. DRAWTEXT(A1=210,HIGH,'第七时间');   
  98. DRAWTEXT(A1=240,HIGH,'第八时间');   
  99. Varr1:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;   
  100. DRAWICON(CROSS(82,Varr1),HIGH+0.108,2);VERTLINE(CROSS(82,varr1)),POINTDOT;   
  101. DRAWSL(CROSS(82,varr1),HHV(HIGH,1),0,8,1),colormagenta,POINTDOT;   
  102. b1:=(SYSPARAM(4)-SYSPARAM(5))/(SYSPARAM(3)-SYSPARAM(2));   
  103. DRAWSL(BARPOS=SYSPARAM(1),LOW,378*b1/100,0,0),COLORwhite,POINTDOT;   
  104. DRAWSL(BARPOS=SYSPARAM(1),LOW,188*b1/100,0,0),COLORwhite,POINTDOT;   
  105. DRAWSL(BARPOS=SYSPARAM(1),LOW,141*b1/100,0,0),COLORwhite,POINTDOT;   
  106. DRAWSL(BARPOS=SYSPARAM(1),LOW,95*b1/100,0,0),COLORwhite,POINTDOT;   
  107. DRAWSL(BARPOS=SYSPARAM(1),LOW,48*b1/100,0,0),COLORgreen,;   
  108. DRAWSL(BARPOS=SYSPARAM(1),LOW,24.5*b1/100,0,0),COLORwhite,POINTDOT;   
  109. DRAWSL(BARPOS=SYSPARAM(1),LOW,16.5*b1/100,0,0),COLORwhite,POINTDOT;   
  110. DRAWSL(BARPOS=SYSPARAM(1),LOW,13*b1/100,0,0),COLORwhite,POINTDOT;   
  111. DRAWSL(BARPOS=SYSPARAM(1),LOW,7*b1/100,0,0),COLORwhite,POINTDOT;   

 

资源下载链接   资源大小:8KB

手机移动版 - 关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - TOP
湘ICP备09016573号-3 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © GSZX.COM.CN ,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识