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

区间分类 (散户 中户 大户 特大 源码)

发布时间:2010/5/19 7:27:32  浏览次数:

 

C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
  1. DRAWGBK(1,COLORRGB(265,0,0),COLORRGB(265,285,0),0);   
  2. IF MARKETLABEL<>'SH' THEN    
  3. DRAWTEXTEX(CLOSE,1,5,20,''+STKLABEL),colorFFFF;   
  4. P:=SYSPARAM(1);   
  5. A2:=SYSPARAM(2);   
  6. A3:=SYSPARAM(3);   
  7. KS:=SYSPARAM(3)-SYSPARAM(2);   
  8. Z:=KS/140;   
  9. W1:=ROUND(70*Z);   
  10. VERTLINE(BARPOS=A2+ROUND(42*Z)),colorFF00FF;   
  11. VERTLINE(BARPOS=A2+ROUND(68*Z)),colorFF00FF;   
  12. 总股本:=CAPITAL;   
  13. 基数:=CAPITAL/5000000;   
  14. 基准股:=总股本*0.1;   
  15. DRAWTEXT(BARPOS=A2+ROUND(5*Z),-4,'区间分类:'),ALIGN0,colorFFFF;   
  16. DRAWTEXT(BARPOS=A2+ROUND(74*Z),-4,'0.1万'),ALIGN0,colorFF;   
  17. DRAWTEXT(BARPOS=A2+ROUND(82*Z),-4,'1万'),ALIGN0,colorFF;   
  18. DRAWTEXT(BARPOS=A2+ROUND(90*Z),-4,'5万'),ALIGN0,colorFF;   
  19. DRAWTEXT(BARPOS=A2+ROUND(98*Z),-4,'10万'),ALIGN0,colorFF;   
  20. DRAWTEXT(BARPOS=A2+ROUND(106*Z),-4,'50万'),ALIGN0,colorFF;   
  21. DRAWTEXT(BARPOS=A2+ROUND(112*Z),-4,'100万'),ALIGN0,colorFF;   
  22. DRAWTEXT(BARPOS=A2+ROUND(120*Z),-4,'500万'),ALIGN0,colorFF;   
  23. DRAWTEXT(BARPOS=A2+ROUND(129*Z),-4,'1000万'),ALIGN0,colorFF;   
  24. DRAWTEXT(BARPOS=A2+ROUND(138*Z),-4,'1000万以上'),ALIGN0,colorED;   
  25. XX:=A3-P;   
  26. KDCM:=100*WINNER(REF(CLOSE,XX));   
  27. SHTL:=100*(1-WINNER(REF(CLOSE,XX)));   
  28. DDCM:=EMA(100*WINNER(REF(CLOSE,XX)),13);   
  29. 总:=总股本;   
  30. 券基:=DDCM*总*0.003+KDCM*总*0.004;   
  31. 普通:=SHTL*总*0.008,LINETHICK0;   
  32. 法人:=ABS(总-券基-普通);   
  33. 虚拟总:=券基+普通+法人;   
  34. 券基户数:=INTPART(ABS(DDCM)*基数*0.008);   
  35. 法人户数:=INTPART(ABS(KDCM)*基数*0.02);   
  36. 普通户数:INTPART(SHTL*20*基数),LINETHICK0;   
  37. 总户数:=券基户数+法人户数+普通户数;   
  38. STICKLINE(BARPOS=A2+ROUND(62*Z),20,20*(券基/虚拟总)+20,15,0),colorFF;   
  39. STICKLINE(BARPOS=A2+ROUND(56*Z),20,20*(法人/虚拟总)+20,15,0),colorFFFF;   
  40. STICKLINE(BARPOS=A2+ROUND(48*Z),20,20*(普通/虚拟总)+20,15,0),colorFF00;   
  41. DRAWTEXT(BARPOS=A2+ROUND(62*Z),-4,'券基'),ALIGN0,colorFF;   
  42. DRAWTEXT(BARPOS=A2+ROUND(56*Z),-4,'法人'),ALIGN0,colorFFFF;   
  43. DRAWTEXT(BARPOS=A2+ROUND(48*Z),-4,'普通'),ALIGN0,colorFF00;   
  44. DRAWTEXT(BARPOS=A2+ROUND(62*Z),6,NUMTOSTR(券基户数,0)),ALIGN0,colorFFFFFF;   
  45. DRAWTEXT(BARPOS=A2+ROUND(56*Z),6,NUMTOSTR(法人户数,0)),ALIGN0,colorFFFFFF;   
  46. DRAWTEXT(BARPOS=A2+ROUND(48*Z),6,NUMTOSTR(普通户数,0)),ALIGN0,colorFFFFFF;   
  47. DRAWTEXT(BARPOS=A2+ROUND(62*Z),15,NUMTOSTR(券基,0)),ALIGN0,colorFF;   
  48. DRAWTEXT(BARPOS=A2+ROUND(56*Z),15,NUMTOSTR(法人,0)),ALIGN0,colorFFFF;   
  49. DRAWTEXT(BARPOS=A2+ROUND(48*Z),15,NUMTOSTR(普通,0)),ALIGN0,colorFF00;   
  50. 特大:=MAX(DDCM,0)*总*0.009,LINETHICK0;   
  51. 大户:=KDCM*总*0.003+DDCM*总*0.001;   
  52. 散户:=SHTL*总*0.008;   
  53. 中户:=ABS(总-特大-大户-散户);   
  54. 特大比:特大/散户,LINETHICK0;   
  55. 散户比:散户/特大,LINETHICK0;   
  56. ZZ:=特大+大户+散户+中户;   
  57. 户数过渡:=RAND(20);   
  58. 特大户数:=ABS(券基户数-户数过渡);   
  59. 大户户数:=法人户数+户数过渡;   
  60. 中户户数:=2*户数过渡;   
  61. 散户户数:=普通户数;   
  62. STICKLINE(BARPOS=A2+ROUND(36*Z),20,20*(特大/ZZ)+20,15,0),colorFF;   
  63. STICKLINE(BARPOS=A2+ROUND(29*Z),20,20*(大户/ZZ)+20,15,0),colorFFFF;   
  64. STICKLINE(BARPOS=A2+ROUND(22*Z),20,20*(中户/ZZ)+20,15,0),colorFF00;   
  65. STICKLINE(BARPOS=A2+ROUND(15*Z),20,20*(散户/ZZ)+20,15,0),color18A4FF;   
  66. DRAWTEXT(BARPOS=A2+ROUND(36*Z),-4,'特大'),ALIGN0,colorFF;   
  67. DRAWTEXT(BARPOS=A2+ROUND(29*Z),-4,'大户'),ALIGN0,colorFFFF;   
  68. DRAWTEXT(BARPOS=A2+ROUND(22*Z),-4,'中户'),ALIGN0,colorFF00;   
  69. DRAWTEXT(BARPOS=A2+ROUND(15*Z),-4,'散户'),ALIGN0,color18A4FF;   
  70. DRAWTEXT(BARPOS=A2+ROUND(36*Z),6,NUMTOSTR(特大户数,0)),ALIGN0,colorFFFFFF;   
  71. DRAWTEXT(BARPOS=A2+ROUND(29*Z),6,NUMTOSTR(大户户数,0)),ALIGN0,colorFFFFFF;   
  72. DRAWTEXT(BARPOS=A2+ROUND(22*Z),6,NUMTOSTR(中户户数,0)),ALIGN0,colorFFFFFF;   
  73. DRAWTEXT(BARPOS=A2+ROUND(15*Z),6,NUMTOSTR(散户户数,0)),ALIGN0,colorFFFFFF;   
  74. DRAWTEXT(BARPOS=A2+ROUND(36*Z),15,NUMTOSTR(特大,0)),ALIGN0,colorFF;   
  75. DRAWTEXT(BARPOS=A2+ROUND(29*Z),15,NUMTOSTR(大户,0)),ALIGN0,colorFFFF;   
  76. DRAWTEXT(BARPOS=A2+ROUND(22*Z),15,NUMTOSTR(中户,0)),ALIGN0,colorFF00;   
  77. DRAWTEXT(BARPOS=A2+ROUND(15*Z),15,NUMTOSTR(散户,0)),ALIGN0,color18A4FF;   
  78. A1K:=SHTL*总*0.008+基准股*0.5+DDCM*总*0.001;   
  79. A1W:=SHTL*总*0.004+基准股*0.7+DDCM*总*0.002;   
  80. A5W:=SHTL*总*0.002+基准股*0.9+DDCM*总*0.002;   
  81. A10W:=基准股*0.15+KDCM*总*0.0002;   
  82. A50W:=基准股*0.3+KDCM*总*0.0001;   
  83. A100W:=基准股*0.1+KDCM*总*0.0001;   
  84. A500W:=DDCM*总*0.01+KDCM*总*0.0001;   
  85. A1000W:=DDCM*总*0.02+KDCM*总*0.0002;   
  86. A1000WP:=DDCM*总*0.05,LINETHICK0;   
  87. 总价:=A1K+A1W+A5W+A10W+A50W+A100W+A500W+A1000W+A1000WP,LINETHICK0;   
  88. B1000w:=A1000W/总价*100,LINETHICK0;   
  89. B1000WP:A1000WP/总价*100,LINETHICK0;   
  90. B1K:(A1K/总价)*100,LINETHICK0;   
  91. {特大比:B1000WP/B1K,LINETHICK0;   
  92. 散户比:B1K/B1000WP,LINETHICK0;}   
  93.   
  94. STICKLINE(BARPOS=A2+ROUND(74*Z),20,20*(A1K/总价)+20,15,0),colorFFFFFF;   
  95. STICKLINE(BARPOS=A2+ROUND(82*Z),20,20*(A1W/总价)+20,15,0),color18A4FF;   
  96. STICKLINE(BARPOS=A2+ROUND(90*Z),20,20*(A5W/总价)+20,15,0),colorFFFF;   
  97. STICKLINE(BARPOS=A2+ROUND(98*Z),20,20*(A10W/总价)+20,15,0),colorFF00;   
  98. STICKLINE(BARPOS=A2+ROUND(106*Z),20,20*(A50W/总价)+20,15,0),colorFFFF00;   
  99. STICKLINE(BARPOS=A2+ROUND(112*Z),20,20*(A100W/总价)+20,15,0),colorFFA826;   
  100. STICKLINE(BARPOS=A2+ROUND(120*Z),20,20*(A500W/总价)+20,15,0),colorFF69B4;   
  101. STICKLINE(BARPOS=A2+ROUND(129*Z),20,20*(A1000W/总价)+20,15,0),color9732F6;   
  102. STICKLINE(BARPOS=A2+ROUND(137*Z),20,20*(A1000WP/总价)+20,15,0),colorFF;   
  103. FILLRGN(CLOSE,-7,-7-0.01);   
  104. DRAWTEXT(BARPOS=A2+ROUND(74*Z),12,NUMTOSTR(A1K,0)),ALIGN0,colorFF;   
  105. DRAWTEXT(BARPOS=A2+ROUND(82*Z),12,NUMTOSTR(A1W,0)),ALIGN0,colorFF0000;   
  106. DRAWTEXT(BARPOS=A2+ROUND(90*Z),12,NUMTOSTR(A5W,0)),ALIGN0,colorFF00;   
  107. DRAWTEXT(BARPOS=A2+ROUND(98*Z),12,NUMTOSTR(A10W,0)),ALIGN0,colorFFFF;   
  108. DRAWTEXT(BARPOS=A2+ROUND(106*Z),12,NUMTOSTR(A50W,0)),ALIGN0,color808080;   
  109. DRAWTEXT(BARPOS=A2+ROUND(114*Z),12,NUMTOSTR(A100W,0)),ALIGN0,colorFF00;   
  110. DRAWTEXT(BARPOS=A2+ROUND(122*Z),12,NUMTOSTR(A500W,0)),ALIGN0,colorFF00;   
  111. DRAWTEXT(BARPOS=A2+ROUND(130*Z),12,NUMTOSTR(A1000W,0)),ALIGN0,colorFF;   
  112. DRAWTEXT(BARPOS=A2+ROUND(137*Z),12,NUMTOSTR(A1000WP,0)),ALIGN0,colorFF;   
  113. DRAWTEXT(BARPOS=A2+ROUND(5*Z),25,'分类持仓%:'),ALIGN0,colorFFFF;   
  114. DRAWTEXT(BARPOS=A2+ROUND(74*Z),18,NUMTOSTR(A1K/总价*100,2)+'%'),ALIGN0,colorFFFFFF;   
  115. DRAWTEXT(BARPOS=A2+ROUND(82*Z),18,NUMTOSTR(A1W/总价*100,2)+'%'),ALIGN0,color18A4FF;   
  116. DRAWTEXT(BARPOS=A2+ROUND(90*Z),18,NUMTOSTR(A5W/总价*100,2)+'%'),ALIGN0,colorFFFF;   
  117. DRAWTEXT(BARPOS=A2+ROUND(98*Z),18,NUMTOSTR(A10W/总价*100,2)+'%'),ALIGN0,colorFF00;   
  118. DRAWTEXT(BARPOS=A2+ROUND(106*Z),18,NUMTOSTR(A50W/总价*100,2)+'%'),ALIGN0,colorFFFF00;   
  119. DRAWTEXT(BARPOS=A2+ROUND(112*Z),18,NUMTOSTR(A100W/总价*100,2)+'%'),ALIGN0,colorFFA826;   
  120. DRAWTEXT(BARPOS=A2+ROUND(121*Z),18,NUMTOSTR(A500W/总价*100,2)+'%'),ALIGN0,colorFF69B4;   
  121. DRAWTEXT(BARPOS=A2+ROUND(129*Z),18,NUMTOSTR(A1000W/总价*100,2)+'%'),ALIGN0,color9732F6;   
  122. DRAWTEXT(BARPOS=A2+ROUND(137*Z),18,NUMTOSTR(A1000WP/总价*100,2)+'%'),ALIGN0,colorFF;   
  123. DRAWTEXT(BARPOS=A2+ROUND(5*Z),6,'参数:'),ALIGN0,colorFFFF;   
  124. VARIABLE:WDAY[7]='星期六';   
  125. WDAY[1]:='星期日';   
  126. WDAY[2]:='星期一';   
  127. WDAY[3]:='星期二';   
  128. WDAY[4]:='星期三';   
  129. WDAY[5]:='星期四';   
  130. WDAY[6]:='星期五';   
  131. FY:=YEAR;   
  132. FM:=MONTH;   
  133. FD:=DAY;   
  134. WD:=WEEKDAY;   
  135. STR1:=''+' '+NUMTOSTR(FY[P],0)+'年'+NUMTOSTR(FM[P],0)+'月'+NUMTOSTR(FD[P],0)+'日 '+WDAY[WD[P]+1]+' '+' ';   
  136. DRAWTEXTEX(CLOSE,1,680,0,''+STR1);   
  137. DRAWTEXTEX(CLOSE,1,880,0,' '),colorFF;   

资源下载链接   资源大小:unknow

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