通达信公式源码概况:

指标类别:通达信公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信cci选股指标公式

  

C1:cci(14);  

C2:"CCI.CCI"(84);  

AA1:=REF(C1,3)=HHV(C1,2*3+1);  

BB1:=BacKSET(AA1,3+1);  

CC1:=FILTER(BB1,3)ANDC1=HHV(C1,3+1);  

A1:=BArslAst(REF(CC1,1));  

背离:REF(CLOSE,A1+1)<CLOSEANDREF(C1,A1+1)>C1ANDCC1;  

DRAWLINE(CC1,C1,FILTER(顶背离>0,5),C1,0),COLORGREEN,LINETHICK2;  

AA2:=REF(C1,3)=LLV(C1,2*3+1);  

BB2:=BACKSET(AA2,3+1);  

CC2:=FILTER(BB2,3)ANDC1=LLV(C1,3+1);  

AA2A:=BARSLAST(REF(CC2,1));  

底背离:REF(C,AA2A+1)>CLOSEANDREF(C1,AA2A+1)<C1ANDCC2;  

DRAWLINE(CC2,C1,REF(底背离>0,5),C1,0),COLORRED,LINETHICK2;  

DRAWLINE(CC2,C1,REF(底背离>0,5),C1,0),COLORRED,LINETHICK2;  

DIFF:=EMA(CLOSE,3)-EMA(CLOSE,8);  

DEA:=EMA(DIFF,5);  

MACD:=2*(DIFF-DEA);  

A1:=EMA(DIFF,5)*100;  

A2:=((EMA(CLOSE,3)-EMA(CLOSE,8)))*100;  

A3:=IF(A2&gt;0,A2,50),POINTDOT,COLORRED;  

A4:=IF(A2&lt;0,A2,50),POINTDOT,COLORGREEN;  

动能A:=A2,COLOR00FFFF,LINETHICK2;  

动能B:=A1,COLORFFFF00,LINETHICK2;  

DRAWBAND(动能A,RGB(200,0,200),动能B,RGB(200,200,200));  

STICKLINE(A2&gt;0,0,A2,0.5,0),COLORRED;  

STICKLINE(A2&lt;0,0,A2,0.5,1),COLORGREEN;  

VAR2:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100;  

VAR3:=SMA(SMA(VAR2,3,1),3,1);  

VAR4:=EMA(VAR3,5);  

AA:=VOL&gt;=REF(V,1)*1.91ANDC&gt;REF(C,1)*1.01;  

BB:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLOR1010FF;  

AA1:=STICKLINE(动能A&lt;动能B,0,-3,2,0);  

BB1:=STICKLINE(动能A&gt;动能B,0,3,2,0);  

持币:AA1,COLOR00FF00;  

持股:BB1,COLORRED;  

底部:STICKLINE(CROSS(BB,9),0,10,1.7,0),COLORFF00FF;  

STICKLINE(CROSS(BB,9),10,20,1.5,0),COLOR00FFFF;  

TYP:=(HIGH+LOW+CLOSE)/3;  

cci:(TYP-ma(TYP,14))/(0.015*AVEDEV(TYP,14));  

XF:IF(CCI>=100,CCI,100),COLORRED,LINETHICK2;  

XA:IF(CCI<=-100,CCI,-100),COLORGREEN,LINETHICK2;  

STICKLINE(CROSS(BB,9),20,30,1,0),COLORRED;  

主力资金:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLORMAGENTA,LINETHICK2;  

散户资金:=EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV(INDEXL,34)),3),COLORGREEN,LINETHICK2;  

XG:CROSS(主力资金,散户资金)AND散户资金&lt;REF(散户资金,1);  

DRAWTEXT(CROSS(BB,9),30,'底部'),COLOR00FFFF;  

BIAS1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;  

BIAS2:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;  

BIAS3:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;  

BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;  

综合乖离:MA(BIAS,3),COLORFFFF00,LINETHICK0;  

BIAS底A:IF(综合乖离&lt;-18,12,0),COLORFF00FF,LINETHICK2;  

BIAS底B:IF(综合乖离&lt;-12,10,0),COLOR0000CC,LINETHICK2;  

BIAS底C:IF(综合乖离&lt;-6,8,0),COLORFFFF00,LINETHICK2;  

X_1:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3);  

X_2:=5;  

选股:IF(CROSS(X_1,X_2),1,0),COLORRED;  

BIAS底D:IF(综合乖离&lt;0,6,0),COLOR00FFFF,LINETHICK2;  

快卖:IF(PEAKBARS(3,15,1)=1,100,0),COLORWHITE;{有未来只做参考}  

快买:IF(TROUGHBARS(3,15,1)=0ANDHIGH>LOW+0.01,-120,0),COLORYELLOW;{有未来只做参考}  

TYP:=(HIGH+LOW+CLOSE)/3;  

秒杀cci:Ema((TYP-MA(TYP,36.0270012))/(0.015*AVEDEV(TYP,36.0270012)),2.0332),COLORWHITE;  

stICKLINE(秒杀CCI<-150,秒杀CCI,-150,10,0),COLOR0000BB;  

STICKLINE(C>0,-150,-151,6,0),COLORBLUE;  

STICKLINE(秒杀CCI>150,秒杀CCI,150,10,0),COLOR0000BB;  

STICKLINE(C>0,150,151,6,0),COLORBLUE;  

image.png

[源码注释]通达信公式动态翻译结果

输出XG:1日前的平滑异同平均的MACD<2日前的平滑异同平均的MACD AND 1日前的平滑异同平均的MACD<平滑异同平均的MACD

每日通达信公式解答:

  

编写要求:  

上一交易日收盘价筹码获利比例大于95%的选股公式。  

解答:  

REF(WINNER(C),1)>0.95;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。