通达信CCI波段公式

[复制链接]
查看380 | 回复0 | 2022-7-24 09:04:09 | 显示全部楼层 |阅读模式

 通达信CCI波段公式

{牛牛指标网提供:www.tdx001.com}

复制内容到剪贴板
  1. TYP:=(HIGH + LOW + CLOSE)/3;    
  2. CCI:(TYP-MA(TYP,14))*100/(1.5*AVEDEV(TYP,14)),COLORRED;    
  3. 涨:CROSS(CCI,0),COLORRED;    
  4. 强买入信号:CROSS(CCI,100),COLORYELLOW;    
  5. 回:=CROSS(CCI,120) AND CCI>0,COLORWHITE;    
  6. {以下设置副图显示方式}    
  7. STICKLINE(涨,0,100,1,0),COLORYELLOW;    
  8. STICKLINE(强买入信号,100,200,1,0),COLORFF00FF;    
  9. STICKLINE(回,150,50,1,0),COLORWHITE;    
  10. DRAWTEXT(回,220,'回'),COLOR00FF00;    
  11. STICKLINE(CCI>=100,100,150,1,0),COLORYELLOW;    
  12. STICKLINE(CCI>=150,150,200,1,0),COLORRED;    
  13. STICKLINE(CCI<=-150,-150,-200,1,0),COLORFF6600;    
  14. 买入信号信号:=STICKLINE(CROSS(CCI,-120),-200,-150,0.5,0),COLORRED;   
  15. STICKLINE(CROSS(CCI,-120),-150,50,0.5,0),COLORRED,LINETHICK1;   
  16. DRAWTEXT(CROSS(CCI,-120),-100,' 买入信号'),COLORRED;   
  17. CCI高度关注:=IF(REF(CCI,1)<-99 AND CCI >-98,1,0),COLORWHITE;   
  18. STICKLINE(CCI高度关注,20,40,0.5,1),LINETHICK3,COLORWHITE;   
  19. CCI逃逸:IF(REF(CCI,1)>99 AND CCI <98 ,1,0),COLORGREEN;   
  20. STICKLINE(CCI逃逸,180,250,0.5,0),LINETHICK3,COLORGREEN;   
  21. 买入信号:IF(REF(CCI,1)<-99 AND CCI >REF(CCI,1),1,0),COLORWHITE;   
  22. STICKLINE(买入信号,-50,50,0.5,0),COLORFF9900,LINETHICK1;   
  23. CCI背:IF(LLV(CCI,2)>LLV(CCI,7) AND LLV(L,2)<=LLV(L,7)  AND HHV(H,10)>MA(CLOSE,60),1,0),COLORWHITE;   
  24. DRAWTEXT(CCI背,CCI-10,'B'),COLORGREEN;   
  25. VAR6:=4*SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1)-    
  26. 3*SMA(SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1),3,1);    
  27. VAR7:=8;    
  28. 准备: IF(VAR6<=8,100,0),STICK,COLORWHITE,LINETHICK2;   
  29. 趋势线: 3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),LINETHICK0;   
  30. 见底信号: 10;   
  31. DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));   
  32. DEA:=EMA(DIFF,9),COLORFF00FF,LINETHICK1;   
  33. CD:=2*(DIFF-DEA),COLORSTICK,LINETHICK1;   
  34. 低位:IF(DIFF<0,100,0),COLORFFFF00,LINETHICK1;   
  35. VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;   
  36. VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;   
  37. VAR400:=EMA(VAR300,5);   
  38. 操盘:=3*VAR300-2*VAR400;   
  39. A1:=CROSS(操盘,VAR300) AND VAR300<2.1 AND C>O;   
  40. STICKLINE(A1,5,0,4,0),COLOR770077;   
  41. STICKLINE(A1,5,0,3,0),COLOR990099;   
  42. STICKLINE(A1,5,0,2,0),COLORBB00BB;   
  43. STICKLINE(A1,5,0,1,0),COLORDD00DD;   
  44. STICKLINE(A1,5,0,0.3,0),COLORFF00FF;   
  45. DRAWTEXT(A1,5.2,'全仓'),COLORRED;   
  46. VAR2:=(((((MA(AMOUNT,5) / MA(VOL,5)) / 100) - ((MA(AMOUNT,110) / MA(VOL,110)) / 100)) / ((MA(AMOUNT,5) / MA(VOL,5)) / 100)) < (0 - 0.273));   
  47. N:=5;   
  48. VAR1:=4*SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1)-    3*SMA(SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1),3.2,1),COLORYELLOW,LINETHICK1;   
  49. 小试牛刀: IF(CROSS(VAR1,VAR2),200,0),STICK,COLORYELLOW;   
  50. RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);   
  51. K:=SMA(RSV,3,1);   
  52. D:=SMA(K,3,1);   
  53. J:=3*K-2*D;   
  54. X:=LLV(J,2)=LLV(J,8);   
  55. DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<19,-200,'←低进'),COLORFFFF00;    
  56. LC:=REF(CLOSE,1);   
  57. RSI:=((SMA(MAX(CLOSE - LC,0),4.1,1))/(SMA(ABS(CLOSE - LC),4.1,1)))*(100);   
  58. 火山反转底部:(CROSS(RSI,11))*(200),COLORGREEN;  

 

复制内容到剪贴板
  1. DZH2源码如下   
  2. TYP:=(HIGH + LOW + CLOSE)/3;    
  3. CCI:(TYP-MA(TYP,14))*100/(1.5*AVEDEV(TYP,14)),COLORRED;    
  4. 涨:CROSS(CCI,0),COLORRED;    
  5. 强买入信号:CROSS(CCI,100),COLORYELLOW;    
  6. 回:=CROSS(CCI,120) AND CCI>0;    
  7. {以下设置副图显示方式}    
  8. STICKLINE(涨,0,100,1,0),COLORYELLOW;    
  9. STICKLINE(强买入信号,100,200,1,0),COLORFF00FF;    
  10. STICKLINE(回,150,50,1,0),COLORWHITE;    
  11. DRAWTEXT(回,220,'回'),COLOR00FF00;    
  12. STICKLINE(CCI>=100,100,150,1,0),COLORYELLOW;    
  13. STICKLINE(CCI>=150,150,200,1,0),COLORRED;    
  14. STICKLINE(CCI<=-150,-150,-200,1,0),COLORFF6600;    
  15. 买入信号信号:=STICKLINE(CROSS(CCI,-120),-200,-150,0.5,0);   
  16. STICKLINE(CROSS(CCI,-120),-150,50,0.5,0),COLORRED,LINETHICK1;   
  17. DRAWTEXT(CROSS(CCI,-120),-100,' 买入信号'),COLORRED;   
  18. CCI高度关注:=IF(REF(CCI,1)<-99 AND CCI >-98,1,0);   
  19. STICKLINE(CCI高度关注,20,40,0.5,1),LINETHICK3,COLORWHITE;   
  20. CCI逃逸:IF(REF(CCI,1)>99 AND CCI <98 ,1,0),COLORGREEN;   
  21. STICKLINE(CCI逃逸,180,250,0.5,0),LINETHICK3,COLORGREEN;   
  22. 买入信号:IF(REF(CCI,1)<-99 AND CCI >REF(CCI,1),1,0),COLORWHITE;   
  23. STICKLINE(买入信号,-50,50,0.5,0),COLORFF9900,LINETHICK1;   
  24. CCI背:IF(LLV(CCI,2)>LLV(CCI,7) AND LLV(L,2)<=LLV(L,7)  AND HHV(H,10)>MA(CLOSE,60),1,0),COLORWHITE;   
  25. DRAWTEXT(CCI背,CCI-10,'B'),COLORGREEN;   
  26. VAR6:=4*SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1)-    
  27. 3*SMA(SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1),3,1);    
  28. VAR7:=8;    
  29. 准备: IF(VAR6<=8,100,0),STICK,COLORWHITE,LINETHICK2;   
  30. 趋势线: 3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),LINETHICK0;   
  31. 见底信号: 10;   
  32. DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));   
  33. DEA:=EMA(DIFF,9);   
  34. CD:=2*(DIFF-DEA);   
  35. 低位:IF(DIFF<0,100,0),COLORFFFF00,LINETHICK1;   
  36. VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;   
  37. VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;   
  38. VAR400:=EMA(VAR300,5);   
  39. 操盘:=3*VAR300-2*VAR400;   
  40. A1:=CROSS(操盘,VAR300) AND VAR300<2.1 AND C>O;   
  41. STICKLINE(A1,5,0,4,0),COLOR770077;   
  42. STICKLINE(A1,5,0,3,0),COLOR990099;   
  43. STICKLINE(A1,5,0,2,0),COLORBB00BB;   
  44. STICKLINE(A1,5,0,1,0),COLORDD00DD;   
  45. STICKLINE(A1,5,0,0.3,0),COLORFF00FF;   
  46. DRAWTEXT(A1,5.2,'全仓'),COLORRED;   
  47. VAR2:=(((((MA(AMOUNT,5) / MA(VOL,5)) / 100) - ((MA(AMOUNT,110) / MA(VOL,110)) / 100)) / ((MA(AMOUNT,5) / MA(VOL,5)) / 100)) < (0 - 0.273));   
  48. N:=5;   
  49. VAR1:=4*SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1)-    3*SMA(SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1),3.2,1);   
  50. 小试牛刀: IF(CROSS(VAR1,VAR2),200,0),STICK,COLORYELLOW;   
  51. RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);   
  52. K:=SMA(RSV,3,1);   
  53. D:=SMA(K,3,1);   
  54. J:=3*K-2*D;   
  55. X:=LLV(J,2)=LLV(J,8);   
  56. DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<19,-200,'←低进'),COLORFFFF00;    
  57. LC:=REF(CLOSE,1);   
  58. RSI:=((SMA(MAX(CLOSE - LC,0),4.1,1))/(SMA(ABS(CLOSE - LC),4.1,1)))*(100);   
  59. 火山反转底部:(CROSS(RSI,11))*(200),COLORGREEN;  

2374832641.jpg

2374832641.jpg


 

回复

使用道具 举报

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

本版积分规则