通达信公式源码概况:

指标类别:通达信公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信四线金蜘蛛选股指标公式

  

CC:=IF(WEEKDAY=5,C,DRAWNULL);  

DIFF:(EMA(CC,12)-EMA(CC,26))/EMA(CC,26);  

DEAA:=EMA(DIFF,9),COLORYELLOW;  

黄金梯:STICKLINE(DEAA>REF(DEAA,1)ANDDIFF>DEAA,DIFF,DEAA,4,0),COLORYELLOW;  

X_1:=EMA(C,3),COLORWHITE;  

X_2:=EMA(C,20),COLORRED;  

P:CROSS(X_1,X_2) ANDC>OANDC>REF(C,1)ANDC/REF(C,1)>=1.018,NODRAW,COLORMAGENTA;  

STICKLINE(P,0,30,2,0),COLORMAGENTA;  

MA1:MA(CLOSE,5);  

MA2:MA(CLOSE,10);  

MA3:MA(CLOSE,20);  

MA4:MA(CLOSE,60);  

MA5:MA(CLOSE,120);  

MA6:MA(CLOSE,240);  

MA7:=MA(CLOSE,40);  

月价托:=COUNT(CROSS(MA1,MA2),10)AND  

COUNT(CROSS(MA1,MA3),10)AND  

COUNT(CROSS(MA2,MA3),1)AND  

MA4>REF(MA4,3)ANDMA5>REF(MA5,3)ANDMA6>REF(MA6,3);  

DRAWTEXT(月价托,H+1,'月价托'),coloryellow;  

STICKLINE(月价托,H+1,H+0.5,0.5,0),colorgreen;  

A1:=COUNT(CROSS(MA2,MA3),1)=1;  

A2:=COUNT(CROSS(MA1,MA3),1)=1;  

A3:=COUNT(CROSS(MA1,MA2),1)=1;  

金蜘蛛:=A1ANDA2ANDA3;  

DRAWTEXT(金蜘蛛,H+1,'金蜘蛛'),coloryellow;  

STICKLINE(金蜘蛛,H+1,H+0.5,0.5,0),colorgreen;  

多方炮:=REF(CLOSE,2)>REF(OPEN,2)ANDREF(CLOSE,1)<REF(OPEN,1)ANDCLOSE>REF(OPEN,1)ANDCLOSE>OPEN;  

DRAWTEXT(多方炮,H+1,'多方炮'),coloryellow;  

STICKLINE(多方炮,H+1,H+0.5,0.5,0),colorgreen;  

PMA1:=MA(CLOSE,5);  

PMA2:=MA(CLOSE,10);  

VMA1:=MA(VOL,5);  

VMA2:=MA(VOL,10);  

DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);  

DEA:=EMA(DIFF,9);  

PPDAY:=BARSLAST(CROSS(PMA1,PMA2));  

VVDAY:=BARSLAST(CROSS(VMA1,VMA2));  

MACDDAY:=BARSLAST(CROSS(DIFF,DEA));  

金叉见底:=COUNT(CROSS(PMA1,PMA2),1)AND  

COUNT(CROSS(VMA1,VMA2),5)AND  

COUNT(CROSS(DIFF,DEA),3);  

DRAWTEXT(三金叉见底,H+1,'三金叉见底'),coloryellow;  

STICKLINE(三金叉见底,H+1,H+1.5,0.5,0),colorgreen;  

三死叉见顶:=COUNT(CROSS(PMA2,PMA1),2)AND  

COUNT(CROSS(VMA2,VMA1),5)AND  

COUNT(CROSS(DEA,DIFF),2);  

DRAWTEXT(三死叉见顶,H+2,'三死叉见顶'),coloryellow;  

STICKLINE(三死叉见顶,H+2,H+2.5,0.5,0),colorgreen;  

N1:=13;N2:=34;N3:=55;  

MS1:(MA(CLOSE,N1)+MA(OPEN,N1)+MA(LOW,N1)+MA(HIGH,N1))/4,COLORRED;  

MS3:(MA(CLOSE,N2)+MA(OPEN,N2)+MA(LOW,N2)+MA(HIGH,N2))/4,COLORGREEN;  

MS5:(MA(CLOSE,N3)+MA(OPEN,N3)+MA(LOW,N3)+MA(HIGH,N3))/4,COLORBLUE;  

MN1:=(MEMA(CLOSE,5)+MEMA(OPEN,5)+MEMA(LOW,5)+MEMA(HIGH,5))/4;  

MN2:=REF(MN1,2);  

A:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1));  

B:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1);  

分水岭:=IF(MA(CLOSE,17)&lt;B,B,MA(CLOSE,17)),COLORFF00FF,LINETHICK1;  

PMA:=分水岭;  

DD1:=分水岭&lt;REF(分水岭,1);  

{IF(DD1,分水岭,DRAWNULL),COLOR00FF00,LINETHICK1;}  

操作线:=分水岭-(EMA(C,3)-分水岭),COLOR00FFFF,LINETHICK1;  

S:=(PMA&gt;操作线);  

{IF(S,分水岭,DRAWNULL),COLOR00FF00,POINTDOT,LINETHICK1;}  

PM:=MA(C,5),COLORFFFFCC,LINETHICK1;  

{IF(PM&gt;REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK1;  

IF(PM=REF(PM,1),PM,DRAWNULL),COLORRED;  

IF(PM&lt;REF(PM,1),PM,DRAWNULL),COLORFF9900,LINETHICK1;}  

DRAWTEXT(CROSS(分水岭,操作线),分水岭-0.1,'三底背离');  

A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));  

B1:=REF(C,A1+1)&gt;CANDREF("MACD.DIF",A1+1)&lt;"MACD.DIF"ANDCROSS("MACD.DIF","MACD.DEA");  

DRAWTEXT(B1&gt;0,L-0.02,'M底背离'),COLOR00FFFF;  

A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));  

B2:=REF(C,A2+1)&gt;CANDREF("KDJ.K",A2+1)&lt;"KDJ.K"ANDCROSS("KDJ.K","KDJ.D");  

DRAWTEXT(B2,L-0.10,'K底背离'),COLORFF00FF;  

A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));  

B3:=REF(C,A3+1)&gt;CANDREF("RSI.RSI1",A3+1)&lt;"RSI.RSI1"ANDCROSS("RSI.RSI1","RSI.RSI2");  

DRAWTEXT(B3&gt;0,L-0.18,'R底背离'),COLOR0000FF;  

C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));  

D1:=REF(C,C1+1)&lt;CANDREF("MACD.DIF",C1+1)&gt;"MACD.DIF"ANDCROSS("MACD.DEA","MACD.DIF");  

DRAWTEXT(D1&gt;0,H+0.16,'M顶背离'),COLOR00FF00;  

C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));  

D2:=REF(C,C2+1)&lt;CANDREF("KDJ.K",C2+1)&gt;"KDJ.K"ANDCROSS("KDJ.D","KDJ.K");  

DRAWTEXT(D2&gt;0,H+0.08,'K顶背离'),COLORFFFFCC;  

C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));  

D3:=REF(C,C3+1)&lt;CANDREF("RSI.RSI1",C3+1)&gt;"RSI.RSI1"ANDCROSS("RSI.RSI2","RSI.RSI1");  

DRAWTEXT(D3&gt;0,H+0.04,'R顶背离'),COLORFF9900;  

零轴:=DYNAINFO(3)*1,COLOR0000FF;  

STICKLINE(1,90/100+零轴,90/100+零轴,2,0),COLOR00BBBB;  

STICKLINE(1,10/100+零轴,10/100+零轴,2,0),COLOR0000BB;  

STICKLINE(1,100/100+零轴,100/100+零轴,2,0),COLORBBBBBB;  

STICKLINE(1,50/100+零轴,50/100+零轴,2,0),COLORFF0000;  

STICKLINE(1,0/100+零轴,0/100+零轴,2,0),COLORBBBB00;  

RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100+50/100;  

K:=SMA(RSV,3,1);  

D:=SMA(K,3,1);  

J:=3*K-2*D;  

KK:=零轴+K/100;  

DD:=零轴+D/100;  

JJ:=零轴+J/100;  

EE:=50/100+零轴;  

DRAWBAND(KK,RGB(200,0,150),EE,RGB(0,170,120));  

DRAWBAND(JJ,RGB(220,0,0),KK,RGB(120,120,170));  

DRAWKLINE(H,O,L,C);  

AAA:=JJ&gt;=KKANDKK&gt;=EE;  

BBB:=JJ&gt;=KKANDKK&lt;EE;  

DDD:=JJ&lt;KKANDKK&gt;=EE;  

EEE:=JJ&lt;KKANDKK&lt;EE;  

STICKLINE(AAA,H,L,0,0),COLOR0000FF;  

STICKLINE(BBB,H,L,0,0),COLORFF00FF;  

STICKLINE(DDD,H,L,0,0),COLOR00FFFF;  

STICKLINE(EEE,H,L,0,0),COLORFFFF00;  

STICKLINE(AAA,CLOSE,OPEN,3.2,0),COLOR000099;  

STICKLINE(AAA,CLOSE,OPEN,1.8,0),COLOR0000BB;  

STICKLINE(AAA,CLOSE,OPEN,1.3,0),COLOR0000DD;  

STICKLINE(AAA,CLOSE,OPEN,0.5,0),COLOR0000FF;  

STICKLINE(BBB,CLOSE,OPEN,3.2,0),COLOR990099;  

STICKLINE(BBB,CLOSE,OPEN,1.8,0),COLORAA00AA;  

STICKLINE(BBB,CLOSE,OPEN,1.3,0),COLORDD00DD;  

STICKLINE(BBB,CLOSE,OPEN,0.5,0),COLORFF00FF;  

STICKLINE(DDD,C,O,3.2,0),COLOR009999;  

STICKLINE(DDD,C,O,2.4,0),COLOR00BBBB;  

STICKLINE(DDD,C,O,1.0,0),COLOR00DDDD;  

STICKLINE(DDD,C,O,0.6,0),COLOR00FFFF;  

STICKLINE(EEE,C,O,3.2,0),COLOR999900;  

STICKLINE(EEE,C,O,1.6,0),COLORBBBB00;  

STICKLINE(EEE,C,O,1.0,0),COLORDDDD00;  

STICKLINE(EEE,C,O,0.5,0),COLORFFFF00;  

LC:=REF(CLOSE,1);  

RSI1:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(ABS(CLOSE-LC),3,1)*100;  

SELL2:=(CROSS(88,RSI1));  

DRAWTEXT(SELL2,HIGH*1.02,'←卖'),COLOR00FF00;  

VB1:=C-REF(C,1);  

VB2:=100*EMA(EMA(VB1,6),6)/EMA(EMA(ABS(VB1),6),6);  

VB3:=IF(LLV(VB2,2)=LLV(VB2,7)ANDCOUNT(VB2&lt;0,2)ANDCROSS(VB2,MA(VB2,2)),1,0);  

VB4:=FILTER(VB3=1,5);  

DRAWTEXT(VB4,LOW*0.98,'←买'),COLOR00FFFF;  

DRAWTEXT_FIX(1,0,0,0,HYBLOCK);  

威廉波段:=100-(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))*100;  

威廉风险:=IF(威廉波段&gt;95,(100/100+零轴)-(100/100+零轴)*0.009,100/100+零轴),COLOR00FFFF,LINETHICK0;  

DRAWBAND(100/100+零轴,RGB(220,220,0),威廉风险,RGB(0,0,0));  

WLDB:=IF(威廉波段&lt;5,(0/100+零轴)+(0/100+零轴)*0.009,0/100+零轴),COLORFFFF00,LINETHICK1;  

DRAWBAND(WLDB,RGB(0,220,220),0/100+零轴,RGB(0,0,0));  

DRAWTEXT_FIX(1,0.05,0.0,0,'【彩色K线标识】★★红色柱—J大于K并在中轴上★★黄色柱–J小于K并在中轴上★★'),COLORFFFFFF;  

DRAWTEXT_FIX(1,0.05,0.035,0,'【彩色K线标识】★★粉色柱—J大于K并在中轴下★★青色柱–J小于K并在中轴下★★'),COLOR00FFFF;  

DRAWTEXT_FIX(1,0.05,0.07,0,'【彩色三角型标识】★★青色三角形—威廉底部★★黄色三角形–威廉顶部★★'),COLORFFFF00;  

ZGB:VOL*100/HSCOL.HSCOL,NODRAW;  

DRAWTEXT(ZGB-REF(ZGB,1)&gt;50,H,'解禁日')COLORGREEN;  

MA30生命线:MA(C,30)LINETHICK1,COLORWHITE;  

MA60牛熊线:MA(C,60)LINETHICK1,COLORRED;  

黄金线:(EMA(C,18)),POINTDOT,LINETHICK5,COLORYELLOW;  

MA43神奇线:MA(C,43)POINTDOT,LINETHICK5,COLORGREEN;  

_10日涨跌%:(C-REF(CLOSE,10))/REF(CLOSE,10)*100,COLORGREEN,NODRAW;  

涨家数:INDEXADV,COLOR0080FF,NODRAW;  

跌家数:INDEXDEC,COLORGREEN,NODRAW;  

涨停:C+0.05&gt;=(ROUND(REF(C,1)*(100+10*(2-NAMELIKE('ST'))/2))/100),COLOR0080FF,NODRAW;  

跌停:C-0.05&lt;=(ROUND(REF(C,1)*(100-10*(2-NAMELIKE('ST'))/2))/100),COLORGREEN,NODRAW;  

Z1:=STRCAT(HYBLOCK,'');  

Z2:=STRCAT(Z1,FGBLOCK);  

Z3:=STRCAT(Z2,DYBLOCK);  

Z4:=STRCAT(Z3,'');  

DRAWTEXT_FIX(ISLASTBAR,0.00,0.99,0,STRCAT(Z4,GNBLOCK)),COLORYELLOW;  

TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,1)))));  

MTIME:=MOD(FROMOPEN,TOTAL);  

CTIME:=IF(MTIME&lt;0.5,TOTAL,MTIME);  

VV:=IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,V);  

N9:=120;  

A100:=CONST(HHV(H,N9)-LLV(L,N9))/CONST(HHV(VV,N9));  

B100:=CONST(LLV(L,N9))-CONST(HHV(VV,N9))*A100/8;  

天数:=10;  

STICKLINE(CURRBARSCOUNT=1&amp;&amp;(SETCODE=0||SETCODE=1),B100+VV*A100/8,B100,-1,-1),COLOR00C0C0;  

STICKLINE(C&gt;=OANDCURRBARSCOUNT&lt;=天数,B100+VV*A100/8,B100,3,1),COLOR3232FF;  

STICKLINE(C&lt;OANDCURRBARSCOUNT&lt;=天数,B100+VV*A100/8,B100,3,0),COLORFFFF54;  

DRAWRECTREL(0,580,100,960,RGB(150,0,0));  

DRAWRECTREL(100,580,200,960,RGB(0,150,150));  

DRAWRECTREL(200,725,300,960,RGB(150,0,150));  

日K:="KD.K"(9,3,3);  

日D:="KD.D"(9,3,3);  

月K:="KDJ.K#MONTH"(9,3,3);  

月D:="KDJ.D#MONTH"(9,3,3);  

周K:="KDJ.K#WEEK"(9,3,3);  

周D:="KDJ.D#WEEK"(9,3,3);  

DRAWTEXT_FIX(ISLASTBAR,0.04,0.60,0,'KDJ'),COLOR00FFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.01,0.65,0,'日K='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.05,0.65,0,日K),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.01,0.7,0,'日D='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.05,0.7,0,日D),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.01,0.75,0,'周K='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.05,0.75,0,周K),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.01,0.8,0,'周D='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.05,0.8,0,周D),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.01,0.85,0,'月K='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.05,0.85,0,月K),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.01,0.9,0,'月D='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.05,0.9,0,月D),COLORFFFFFF;  

日DIF:="MACD.DIF"(12,26,9);  

日DEA:="MACD.DEA"(12,26,9);  

周DIF:="MACD.DIF#WEEK"(12,26,9);  

周DEA:="MACD.DEA#WEEK"(12,26,9);  

月DIF:="MACD.DIF#MONTH"(12,26,9);  

月DEA:="MACD.DEA#MONTH"(12,26,9);  

DRAWTEXT_FIX(ISLASTBAR,0.13,0.60,0,'MACD'),COLOR00FFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.11,0.65,0,'日DIF='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.155,0.65,0,日DIF),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.11,0.7,0,'日DEA='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.155,0.7,0,日DEA),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.11,0.75,0,'周DIF='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.155,0.75,0,周DIF),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.11,0.8,0,'周DEA='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.155,0.8,0,周DEA),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.11,0.85,0,'月DIF='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.155,0.85,0,月DIF),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.11,0.9,0,'月DEA='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.155,0.9,0,月DEA),COLORFFFFFF;  

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

日CCI:=(TYP-MA(TYP,84))/(0.015*AVEDEV(TYP,84));  

周CCI:=(TYP-MA(TYP,21))/(0.015*AVEDEV(TYP,21));  

月CCI:=(TYP-MA(TYP,9))/(0.015*AVEDEV(TYP,9));  

DRAWTEXT_FIX(ISLASTBAR,0.235,0.75,0,'CCI'),COLOR00FFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.206,0.80,0,'日CCI='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.250,0.80,0,日CCI),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.206,0.85,0,'周CCI='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.250,0.85,0,周CCI),COLORFFFFFF;  

DRAWTEXT_FIX(ISLASTBAR,0.206,0.90,0,'月CCI='),COLORFFFFFF;  

DRAWNUMBER_FIX(ISLASTBAR,0.250,0.90,0,月CCI),COLORFFFFFF;  

{数字显示涨跌停K线天数}  

A1000:=REF(C,1);  

涨停A:=IF((C-A1000)*100/A1000&gt;=(10-0.01*100/A1000),1,0);  

跌停A:=IF((A1000-C)*100/A1000&gt;=(10-0.01*100/A1000),1,0);  

涨停次数:=COUNT(涨停A,BARSSINCE(涨停A)+1);  

跌停次数:=COUNT(跌停A,BARSSINCE(跌停A)+1);  

DRAWNUMBER(涨停A,HIGH*1.04,涨停次数),COLORYELLOW;  

DRAWNUMBER(跌停A,HIGH*1.04,跌停次数),COLORCYAN;  

DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.62,0.95,0,涨停次数),COLORYELLOW;  

DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.72,0.95,0,跌停次数),COLORCYAN;  

DRAWTEXT_FIX(CURRBARSCOUNT=1,0.55,0.95,0,'上市以来共涨停:'),COLORYELLOW;  

DRAWTEXT_FIX(CURRBARSCOUNT=1,0.65,0.95,0,'上市以来共跌停:'),COLORCYAN;  

涨停K线:=IF((C-A1000)*100/A1000&gt;=(10-0.01*100/A1000),1,0);  

跌停K线:=IF((A1000-C)*100/A1000&gt;=(10-0.01*100/A1000),1,0);  

持股区域:STICKLINE(MN1&gt;MN2,MN1,MN2,1,0),COLORYELLOW;  

持币区域:STICKLINE(MN1&lt;MN2,MN1,MN2,1,0),COLORBLUE;  

MA11:=MA(CLOSE,10),COLORRED;  

MA33:=MA(CLOSE,30),COLORYELLOW;  

MA55:=MA(CLOSE,55),COLORBLUE;  

年线:=MA(CLOSE,250),COLORGREEN;  

Y:=(MA(C,11)-MA(C,55))/MA(C,11)*100;  

{135均线战法}  

YY1:=C&gt;MA(C,11)ANDOPEN&lt;MA(C,11);{一阳三线}  

YY3:=C&gt;MA(C,33)ANDOPEN&lt;MA(C,33);  

YY5:=C&gt;MA(C,55)ANDOPEN&lt;MA(C,55);  

SJ1:=ABS(MA(CLOSE,11)-MA(CLOSE,33))&lt;C*0.01;{11线33线55线接近}  

SJ2:=ABS(MA(CLOSE,33)-MA(CLOSE,55))&lt;C*0.01;  

SJ3:=CROSS(MA(CLOSE,11),MA(CLOSE,55));{11线上穿55线}  

RY1:=C/OPEN&gt;1.04;{阳线4%}  

RY2:=REF(OPEN,1)/REF(CLOSE,1)&gt;1.04;{阴线4%}  

RY3:=ABS(OPEN-REF(C,1))&lt;C*0.02ANDABS(C-REF(OPEN,1))&lt;C*0.02;{两线相等}  

HK1:=CROSS(MA(C,11),MA(C,55));{11线上穿55线}  

HK2:=C&lt;O;{当日收阴}  

HK3:=ABS(L-MA(C,11))&lt;C*0.03ORABS(C-MA(C,11))&lt;C*0.04;{收盘价或最低价在11线}  

HK:=HK1ANDHK2ANDHK3;  

JG1:=ABS(MA(C,11)-MA(C,33))&lt;C*0.02ANDABS(MA(C,11)-MA(C,55))&lt;C*0.02;  

JG2:=O&gt;MA(C,11)ORO=MA(C,11);  

JG3:=C/OPEN&gt;1.03;{阳线3%}  

JG:=JG1ANDJG2ANDJG3;  

HY1:=CROSS(MA(C,11),MA(C,55));{11线上穿55线}  

HY2:=OPEN&lt;CANDC/OPEN&gt;1.02;{阳线3%}  

HY3:=ABS(OPEN-MA(C,11))&lt;C*0.05;{开盘在11线附近}  

HY:=HY1ANDHY2ANDHY3;  

JW1:=C&lt;OPENANDREF(C,1)&lt;REF(OPEN,1);  

JW2:=OPEN&lt;REF(C,1)ANDC&gt;REF(L,1);  

JW3:=O&lt;MA(C,11)ANDO&lt;MA(C,33)ANDO&lt;MA(C,55);  

JW:=JW1ANDJW2ANDJW3;  

TS1:=CROSS(MA(C,11),MA(C,33));{11线上穿33线}  

TS2:=MA(C,11)&lt;MA(C,55);  

TS:=TS1ANDTS2;  

MK1:=MA(C,11)&gt;MA(C,55)ANDMA(C,33)&gt;MA(C,55);  

MK:=TS1ANDMK1;  

YZ1:=C/O&gt;1.02ANDH/C&gt;1.02ANDO/L&lt;1.02;{收阳有上影}  

YZ2:=REF(C,1)&gt;REF(O,1)ANDO&gt;MA(C,11);{昨收阳今大于均线}  

YZ:=YZ1ANDYZ2ANDY&gt;10;  

DS1:=OPEN/C&gt;1.04ANDO/REF(C,1)&gt;1.03;{高开收阴}  

DS2:=V*100/FINANCE(7)&gt;0.08ANDY&gt;8;{换手高涨幅大}  

DS:=DS1ANDDS2;  

YJ1:=H/O&gt;1.04;  

YJ2:=ABS(C-O)&lt;C*0.03;  

YJ3:=C/MA(C,11)&gt;1.1;  

YJ:=YJ1ANDYJ2ANDDS2ANDYJ3ANDYZ2;  

(YY1ANDYY5ANDYY3)OR(SJ1ANDSJ2ANDSJ3)OR(RY1ANDRY2ANDRY3)OR  

(HK)OR(JG)OR(HY)OR(JW)OR(TS)OR(MK)OR(YZ)OR(DS)OR(YJ);  

image.png

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

上次平滑异同平均的DIF[取周线数据]>平滑异同平均的DEA[取周线数据]上穿0.5距今天数位于10和20之间

每日通达信公式解答:

  

首页条件选股5日均线穿过K线的选股公式  

5日均线穿过K线的选股公式  

选股条件  

条件选股公式:5日均线拦腰穿过K线。  

编写源码  

O<MA(C,5)ANDCROSS(C,MA(C,5));


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