公式网-网站导航


网站搜索:  

公式在线 发表于2009/9/2 22:11:54

牛熊波浪(源码)

 

C/C++ Code复制内容到剪贴板
  1. 牛熊波浪   
  2. 量比:=v/ema(v,20);   
  3. c1:=(c+2*h+l+o)/5;   
  4. a1:=EMA((EMA(c1,2)+EMA(c1,4)+EMA(c1,6))/3,3);   
  5. a2:=EMA((EMA(c1,6)+EMA(c1,8)+EMA( c1,10))/3,3);   
  6. a3:=EMA((EMA(c1,10)+EMA(c1,12)+EMA( c1,14))/3,3);   
  7. a4:=EMA((EMA(c1,14)+EMA(c1,16)+EMA( c1,18))/3,3);   
  8. a5:=EMA((EMA(c1,18)+EMA(c1,20)+EMA( c1,22))/3,3);   
  9. a6:=EMA((EMA(c1,22)+EMA(c1,24)+EMA(c1,26))/3,3);   
  10. a:=EMA((EMA(c1,29)+EMA(c1,31)+EMA(c1,33))/3,3),colorwhite;   
  11. PARTLINE(c1>a,a),colormagenta,linethick2;   
  12. PARTLINE(c1<a,a),colorgreen,linethick2;   
  13. PARTLINE(a1>ref(a1,1),a1),colormagenta,POINTDOT;   
  14. PARTLINE(a2>ref(a2,1),a2),colormagenta,POINTDOT;   
  15. PARTLINE(a3>ref(a3,1),a3),colormagenta,POINTDOT;   
  16. PARTLINE(a4>ref(a4,1),a4),colormagenta,POINTDOT;   
  17. PARTLINE(a5>ref(a5,1),a5),colormagenta,POINTDOT;   
  18. PARTLINE(a6>ref(a6,1),a6),colormagenta,POINTDOT;   
  19. PARTLINE(a1<ref(a1,1),a1),colorgreen,POINTDOT;   
  20. PARTLINE(a2<ref(a2,1),a2),colorgreen,POINTDOT;   
  21. PARTLINE(a3<ref(a3,1),a3),colorgreen,POINTDOT;   
  22. PARTLINE(a4<ref(a4,1),a4),colorgreen,POINTDOT;   
  23. PARTLINE(a5<ref(a5,1),a5),colorgreen,POINTDOT;   
  24. PARTLINE(a6<ref(a6,1),a6),colorgreen,POINTDOT;   
  25. tj:=c1>a;   
  26. tj2:=c1>open or c1=open and c1>ref(c1,1);   
  27. STICKLINE(tj2,HIGH,LOW,0.5,0),colorred;    
  28. STICKLINE(tj,OPEN,CLOSE,8,0),color102088;   
  29. STICKLINE(tj,OPEN,CLOSE,7,0),color102099;   
  30. STICKLINE(tj,OPEN,CLOSE,6,0),color1020aa;   
  31. STICKLINE(tj,OPEN,CLOSE,5,0),color1020bb;   
  32. STICKLINE(tj,OPEN,CLOSE,4,0),color1020cc;   
  33. STICKLINE(tj,OPEN,CLOSE,3,0),color1020dd;   
  34. STICKLINE(tj,OPEN,CLOSE,2,0),color1020ee;   
  35. STICKLINE(tj,OPEN,CLOSE,1,0),color1020ff;   
  36.   
  37. STICKLINE(not(tj),OPEN,CLOSE,8,0),colorff7700;   
  38. STICKLINE(not(tj),OPEN,CLOSE,7,0),colorff8800;   
  39. STICKLINE(not(tj),OPEN,CLOSE,6,0),colorff9900;   
  40. STICKLINE(not(tj),OPEN,CLOSE,5,0),colorffaa00;   
  41. STICKLINE(not(tj),OPEN,CLOSE,4,0),colorffbb00;   
  42. STICKLINE(not(tj),OPEN,CLOSE,3,0),colorffcc00;   
  43. STICKLINE(not(tj),OPEN,CLOSE,2,0),colorffdd00;   
  44. STICKLINE(not(tj),OPEN,CLOSE,1,0),colorffee00;   
  45. c11:=ref(c,1);   
  46. c2:=hhv(c11,2);   
  47. c3:=llv(c11,1);   
  48. et:=hhv(c11,2);   
  49. et1:=ref(et,1);   
  50. xb:=llv(c11,1);   
  51. xb1:=ref(xb,1);   
  52. m:=BARSLAST(c<xb and c11>=xb1);   
  53. m1:=ref(m,1);   
  54. n9:=BARSLAST(c>et and c11<=et1);   
  55. n1:=ref(n9,1);   
  56. m2:=BARSLAST(m-n9>0 and m1<=n1)+1;   
  57. n2:=BARSLAST(n9-m>0 and n1<=m1)+1;   
  58. et2:=hhv(et,m2);   
  59. xb2:=llv(xb,n2);   
  60. app:=if(m-n9>0 and m1<=n1,1,if(n9-m>0 and n1<=m1,0,2));   
  61. h11:=if(m-n9>0,c,et2);   
  62. h2:=if(app=1,c,c2);   
  63. h3:=if(m-n9<0,c,xb2);   
  64. h4:=if(app=1,c,xb2);   
  65. 关键位:=if(m-n9>0  or app=1 ,c,h3);   
  66. p1:=l<a and c>a and 量比>1  and a1>ref(a1,1)  and 关键位>ref(关键位,1) or cross(c,a) and 量比>1 and 关键位>ref(关键位,1);   
  67. DRAWTEXT(p1,L*0.99,'买'),COLORgreen,ALIGN0;   
  68.   
  69.   
  70. 量比:=v/ema(v,20);   
  71. c1:=(c+2*h+l+o)/5;   
  72. a1:=EMA((EMA(c1,2)+EMA(c1,4)+EMA(c1,6))/3,3);   
  73. a2:=EMA((EMA(c1,6)+EMA(c1,8)+EMA( c1,10))/3,3);   
  74. a3:=EMA((EMA(c1,10)+EMA(c1,12)+EMA( c1,14))/3,3);   
  75. a4:=EMA((EMA(c1,14)+EMA(c1,16)+EMA( c1,18))/3,3);   
  76. a5:=EMA((EMA(c1,18)+EMA(c1,20)+EMA( c1,22))/3,3);   
  77. a6:=EMA((EMA(c1,22)+EMA(c1,24)+EMA(c1,26))/3,3);   
  78. a:=EMA((EMA(c1,29)+EMA(c1,31)+EMA(c1,33))/3,3),colorwhite;   
  79. PARTLINE(c1>a,a),colormagenta,linethick2;   
  80. PARTLINE(c1<a,a),colorgreen,linethick2;   
  81. PARTLINE(a1>ref(a1,1),a1),colormagenta,POINTDOT;   
  82. PARTLINE(a2>ref(a2,1),a2),colormagenta,POINTDOT;   
  83. PARTLINE(a3>ref(a3,1),a3),colormagenta,POINTDOT;   
  84. PARTLINE(a4>ref(a4,1),a4),colormagenta,POINTDOT;   
  85. PARTLINE(a5>ref(a5,1),a5),colormagenta,POINTDOT;   
  86. PARTLINE(a6>ref(a6,1),a6),colormagenta,POINTDOT;   
  87. PARTLINE(a1<ref(a1,1),a1),colorgreen,POINTDOT;   
  88. PARTLINE(a2<ref(a2,1),a2),colorgreen,POINTDOT;   
  89. PARTLINE(a3<ref(a3,1),a3),colorgreen,POINTDOT;   
  90. PARTLINE(a4<ref(a4,1),a4),colorgreen,POINTDOT;   
  91. PARTLINE(a5<ref(a5,1),a5),colorgreen,POINTDOT;   
  92. PARTLINE(a6<ref(a6,1),a6),colorgreen,POINTDOT;   
  93. tj:=c1>a;   
  94. tj2:=c1>open or c1=open and c1>ref(c1,1);   
  95. STICKLINE(tj2,HIGH,LOW,0.5,0),colorred;    
  96. STICKLINE(tj,OPEN,CLOSE,8,0),color102088;   
  97. STICKLINE(tj,OPEN,CLOSE,7,0),color102099;   
  98. STICKLINE(tj,OPEN,CLOSE,6,0),color1020aa;   
  99. STICKLINE(tj,OPEN,CLOSE,5,0),color1020bb;   
  100. STICKLINE(tj,OPEN,CLOSE,4,0),color1020cc;   
  101. STICKLINE(tj,OPEN,CLOSE,3,0),color1020dd;   
  102. STICKLINE(tj,OPEN,CLOSE,2,0),color1020ee;   
  103. STICKLINE(tj,OPEN,CLOSE,1,0),color1020ff;   
  104.   
  105. STICKLINE(not(tj),OPEN,CLOSE,8,0),colorff7700;   
  106. STICKLINE(not(tj),OPEN,CLOSE,7,0),colorff8800;   
  107. STICKLINE(not(tj),OPEN,CLOSE,6,0),colorff9900;   
  108. STICKLINE(not(tj),OPEN,CLOSE,5,0),colorffaa00;   
  109. STICKLINE(not(tj),OPEN,CLOSE,4,0),colorffbb00;   
  110. STICKLINE(not(tj),OPEN,CLOSE,3,0),colorffcc00;   
  111. STICKLINE(not(tj),OPEN,CLOSE,2,0),colorffdd00;   
  112. STICKLINE(not(tj),OPEN,CLOSE,1,0),colorffee00;   
  113. c11:=ref(c,1);   
  114. c2:=hhv(c11,2);   
  115. c3:=llv(c11,1);   
  116. et:=hhv(c11,2);   
  117. et1:=ref(et,1);   
  118. xb:=llv(c11,1);   
  119. xb1:=ref(xb,1);   
  120. m:=BARSLAST(c<xb and c11>=xb1);   
  121. m1:=ref(m,1);   
  122. n9:=BARSLAST(c>et and c11<=et1);   
  123. n1:=ref(n9,1);   
  124. m2:=BARSLAST(m-n9>0 and m1<=n1)+1;   
  125. n2:=BARSLAST(n9-m>0 and n1<=m1)+1;   
  126. et2:=hhv(et,m2);   
  127. xb2:=llv(xb,n2);   
  128. app:=if(m-n9>0 and m1<=n1,1,if(n9-m>0 and n1<=m1,0,2));   
  129. h11:=if(m-n9>0,c,et2);   
  130. h2:=if(app=1,c,c2);   
  131. h3:=if(m-n9<0,c,xb2);   
  132. h4:=if(app=1,c,xb2);   
  133. 关键位:=if(m-n9>0  or app=1 ,c,h3);   
  134. p1:=l<a and c>a and 量比>1  and a1>ref(a1,1)  and 关键位>ref(关键位,1) or cross(c,a) and 量比>1 and 关键位>ref(关键位,1);   
  135. DRAWTEXT(p1,L*0.99,'买'),COLORgreen,ALIGN0 ;   

 



网站搜索:  



Copyright © 2009-2010 gszb.com ™,All Rights Reserved. 
公式网-www.gszx.com.cn-股票指标公式网