通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信副图指标公式源码
MS:=EMA(100*(INDEXC-LLV(INDEXL,5))/(HHV(INDEXH,5)-LLV(INDEXL,5)),5)
;
个股强:=EMA(100*(C-LLV(LOW,5))/(HHV(H,5)-LLV(LOW,5)),5);
K1:=BACKSET(个股强 REF(个股强,1),2);
个股弱:=IF(K1,个股强,DRAWNULL);
差值:=个股强-MS,{POINTDOT};
0,POINTDOT;
STICKLINE(个股强 0,0,个股强*1.0,4,0)COLOR0000FF;
STICKLINE(个股强 0,0,个股强*0.8,4,0)COLOR0066FF;
STICKLINE(个股强 0,0,个股强*0.6,4,0)COLOR0099FF;
STICKLINE(个股强 0,0,个股强*0.4,4,0)COLOR00CCFF;
STICKLINE(个股强 0,0,个股强*0.2,4,0)COLOR00FFFF;
STICKLINE(个股弱=个股弱,0,个股弱*1.0,4,0)COLOR00FF00;
STICKLINE(个股弱=个股弱,0,个股弱*0.8,4,0)COLOR00CC33;
STICKLINE(个股弱=个股弱,0,个股弱*0.6,4,0)COLOR009933;
STICKLINE(个股弱=个股弱,0,个股弱*0.4,4,0)COLOR007733;
STICKLINE(个股弱=个股弱,0,个股弱*0.2,4,0)COLOR005500;
MSD:EMA(100*(INDEXC-LLV(INDEXL,5))/(HHV(INDEXH,5)-LLV(INDEXL,5)),5)
,COLORWHITE,LINETHICK1;
K2:=BACKSET(个股强 REF(个股强,1),2);
个股强买:IF(K2,个股强,DRAWNULL),COLORMAGENTA,LINETHICK3;
K3:=BACKSET(个股强 REF(个股强,1),2);
个股弱卖:IF(K3,个股强,DRAWNULL),COLORBLUE,LINETHICK3;
DRAWTEXT(CROSS(大盘MS,20),20, 大盘反弹 ),COLORRED,LINETHICK3;
公式:(粉色线出现买入,应用于预警或许好点。为了减小风险我把选股位
置设到40线下,这样信号也少点。希望能为大家起到帮助)
个股强:=EMA(100*(C-LLV(LOW,5))/(HHV(H,5)-LLV(LOW,5)),5);
K1:=个股强 REF(个股强,1);
K2:=个股强 REF(个股强,1);
个股弱:=IF(K1,个股强,DRAWNULL);
个股强买:=IF(K2,个股强,DRAWNULL);
XG:REF(个股弱,1)ANDK2AND个股强买
A0:=(L+H+C*2)/4;
A1:=EMA(A0,14)COLORYELLOW,LINETHICK2;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
A2X:=(EMA(A0,20)-REF(EMA(A0,20),1))/REF(EMA(A0,20),1)*100;
G1:=BARSLAST(CROSS(A1X,0));
买⼊⽌损:REF(A0,G1),COLORWHITE,LINETHICK1;
脉冲:(A0-A1)/A1*100,NODRAW;
斜脉冲:(A0-REF(A0,1))/(A1-REF(A1,1)),NODRAW;
买⼊盈利:(A0-买⼊⽌损)/买⼊⽌损*100,NODRAW;
Y1:=REF(A0,G1)*1.1,COLORGREEN;
Y2:=REF(A0,G1)*1.2,COLORGREEN;
Y3:=REF(A0,G1)*1.3,COLORGREEN;
Y4:=REF(A0,G1)*1.4,COLORGREEN;
Y5:=REF(A0,G1)*1.5,COLORGREEN;
Y6:=REF(A0,G1)*1.6,COLORGREEN;
Y7:=REF(A0,G1)*1.7,COLORGREEN;
B1:IF(A1X =0,买⼊⽌损,DRAWNULL),COLORRED,LINETHICK1;
B2:IF(A1X =0,A1,DRAWNULL),COLORFF33FF,LINETHICK2;
①:IF(H =Y1,Y1,DRAWNULL),COLORGREEN,LINETHICK3;
②:IF(H =Y2,Y2,DRAWNULL),COLORGREEN;
③:IF(H =Y3,Y3,DRAWNULL),COLORGREEN,CIRCLEDOT;
④:IF(H =Y4,Y4,DRAWNULL),COLORGREEN;
⑤:IF(H =Y5,Y5,DRAWNULL),COLORGREEN;
⑥:IF(H =Y6,Y6,DRAWNULL),COLORGREEN;
⑦:IF(H =Y7,Y7,DRAWNULL),COLORGREEN;
JX1:=MA(C,5);
JX2:=MA(C,10);
JX3:=MA(C,20);
JTTJ1:=BARSLAST(CROSS(JX1,JX2));
JTTJ2:=BARSLAST(CROSS(JX1,JX3));
JTTJ3:=BARSLAST(CROSS(JX2,JX3));
JTTJ4:=JTTJ1 =JTTJ2;
JTTJ5:=JTTJ2 =JTTJ3;
JTTJ6:=JTTJ3=0;
⽉价托:=JTTJ4ANDJTTJ5ANDJTTJ6;
JX4:=MA(C,40);
JX5:=MA(C,60);
JTTJ7:=BARSLAST(CROSS(JX3,JX4));
JTTJ8:=BARSLAST(CROSS(JX3,JX5));
JTTJ9:=BARSLAST(CROSS(JX4,JX5));
JTTJ10:=JTTJ7 =JTTJ8;
JTTJ11:=JTTJ8 =JTTJ9;
JTTJ12:=JTTJ9=0;
季价托:=JTTJ10ANDJTTJ11ANDJTTJ12;
JTTJ13:=BARSLAST(CROSS(JX1,JX2));
JTTJ14:=BARSLAST(CROSS(JX1,JX5));
JTTJ15:=BARSLAST(CROSS(JX2,JX5));
JTTJ16:=JTTJ13 =JTTJ14;
JTTJ17:=JTTJ14 =JTTJ15;
JTTJ18:=JTTJ15=0;
短长托:=JTTJ16ANDJTTJ17ANDJTTJ18;
BOLL:=MA(C,20);
UPPER:=BOLL+2*STD(C,20);
LOWER:=BOLL-2*STD(C,20);
⼤⿊马:=CROSS(C,UPPER)ANDC/REF(C,1) 1.05,COLORRED;
DRAWTEXT(⼤⿊马ANDC MA(C,60)ANDC MA(C,90)ANDC MA(C,120)AND
C MA(C,250),H*1.03,敢死队),COLORYELLOW;
DRAWTEXT(⽉价托,L*0.98,⽉价托),COLORWHITE;
DRAWTEXT(季价托,H+0.05,季价托),COLORWHITE;
DRAWTEXT(短长托,L-0.1,短长托),COLORWHITE;
回归斜率线A:=EMA(SLOPE(C,4)*20+C,42);
经典RL:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
经典K:=SMA(经典RL,3,1);经典D:=SMA(经典K,3,1);经典J:=3*经典K-2*经典D;
MAHL1:=100*((EMA((H+L)/2,3)-LLV(EMA((H+L)/2,5),30)-(EMA(H,20)-EMA(L,20)))
/(LLV(EMA((H+L)/2,5),30)-(EMA(H,20)-EMA(L,20))));
MAHL2:=IF(EMA(C,2) 回归斜率线AANDMAHL1 0,EMA(C,3),LLV(EMA((H+L)/2,5),30));
MAHL3:=IF(EMA(C,2) 回归斜率线AANDMAHL1 0,LLV(EMA((H+L)/2,5),30),EMA(C,5));回归
斜率带:DRAWBAND(回归斜率线A,RGB(235,0,230),REF(回归斜率线A,2),RGB(0,104,154));
上线:=SMA(C,6.5,1);
⼀号⽀撑线:SMA(C,14.5,1);
上线1:=SMA(C,3,1);
⼀号⽀撑线1:=SMA(C,8,1);
上线2:=SMA(C,3.5,1);
DRAWTEXT(CROSS(⼀号⽀撑线1,上线1),H*1.08,洗盘),COLOR00FF00;
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,25))/4;
UPR:=BBI+3*STD(BBI,13),LINETHICK2;
DWN:=BBI-3*STD(BBI,13);
安全:=MA(CLOSE,55),LINETHICK2;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWTEXT(CROSS(82,RSI)ANDCLOSE 上线1,HIGH*1.04,减仓)
,COLORFF9966,LINETHICK2;
A7:=(2*C+H+L)/4;
操作:MA(A7,5),COLORBLUE,LINETHICK2;
操作1:=MA(A7,5)*1.03,LINETHICK2;
操作2:=MA(A7,5)*0.97,LINETHICK2;
DRAWTEXT(CROSS(上线1,上线)AND上线1 操作,LOW*0.92,买进),COLORYELLOW;
VAR1:LLV(A7,21);
VAR2:HHV(A7,30);
DRAWTEXT(CROSS(上线1,操作)AND上线1 ⼀号⽀撑线AND上线1 ⼀号⽀撑线1AND上线1 上线ANDCLOSE VAR1,LOW*0.98,见底),COLORYELLOW;
YCX:=操作 =REF(操作,1);
H1:=MAX(MAX(上线,⼀号⽀撑线1),⼀号⽀撑线);
L1:=MIN(MIN(上线,⼀号⽀撑线1),⼀号⽀撑线);
DRAWTEXT(CROSS(上线1,⼀号⽀撑线1)AND上线1 操作,LOW*0.98,全仓
),COLORYELLOW;
SK:=EMA((A7-VAR1)/(VAR2-VAR1)*100,7);
SD:=EMA(0.667*REF(SK,1)+0.333*SK,5);
M1:=1000*操作/⼀号⽀撑线 =1015AND1000*操作/⼀号⽀撑线 =975;
M2:=1000*⼀号⽀撑线1/⼀号⽀撑线 =1020AND⼀号⽀撑线1/⼀号⽀撑线 =980;
M3:=1000*上线/⼀号⽀撑线 =1015AND上线/⼀号⽀撑线 =985;
DRAWTEXT(IF(COUNT(CLOSE REF(CLOSE,1),13)/13 6/10AND
COUNT(SK SD,6)ANDREF(LOW,5)=LLV(LOW,120)ANDREF(CLOSE =OPEN,4)AND
REF(CLOSE OPEN,3)ANDREF(CLOSE OPEN,2)ANDREF(OPEN CLOSE,1)AND
OPEN REF(CLOSE,1),1,0),LOW*0.94,买进),COLORYELLOW;
D:=MA(CLOSE,89)-MA(CLOSE,10)/3;
DRAWTEXT(IF(CLOSE DANDVOL/240 MA(VOL,5)/240AND
CLOSE REF(CLOSE,1)*1.08
ANDCLOSE MA(CLOSE,13)*1.3,1,0),LOW*0.88,),COLORBROWN;
RSV:=(CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100;
K:=SMA(RSV,3,1);
D1:=SMA(K,3,1);
J:=3*K-2*D1;
VAR3:=(2*CLOSE+HIGH+LOW)/3;VAR4:=EMA(EMA(EMA(VAR3,4),4),4);E:=(VAR4-
REF(VAR4,1))/REF(VAR4,1)*100;
F:=MA(E,3)+0.03;
G:=MA(E,1);
DRAWICON(CROSS(F,G)ANDJ 65,HIGH*1.02,15),COLORGREEN;
DRAWICON(CROSS(G,F),LOW*0.9,9),COLORYELLOW;
DRAWTEXT(CLOSE OPENANDH1 CANDO L1ANDYCXANDCROSS(上线1,操作)
ANDLOW VAR1AND上线1 ⼀号⽀撑线ANDJ 90,LOW*0.9,主升),COLORRED;
DRAWTEXT(CROSS(上线1,操作)ANDM1ANDM2ANDM3,LOW*0.94,买进
),COLORYELLOW;
DRAWTEXT(CLOSE OPENAND上线 ⼀号⽀撑线1AND⼀号⽀撑线1 ⼀号⽀撑线AND
CLOSE MA(CLOSE,⼀号⽀撑线)AND操作 =REF(CLOSE,操作)ANDCROSS(上线1,操作)
ANDLOW VAR1ANDJ 90,LOW*0.9,主升),COLORRED;
DRAWTEXT(CLOSE OPENAND操作 上线AND上线 ⼀号⽀撑线1AND⼀号⽀撑线1 ⼀号
⽀撑线ANDCROSS(上线1,操作)ANDLOW VAR1ANDJ 90,LOW*0.86,回踩买进
),COLORRED;
DRAWTEXT(CLOSE OPENANDCROSS(上线,⼀号⽀撑线)ANDLOW VAR1AND
J 90,LOW*0.86,回踩买进),COLORRED;
STICKLINE(CLOSE REF(CLOSE,1),HIGH,LOW,0,0),COLORRED;
STICKLINE(C OANDC REF(C,1),C,O,3,0),COLORFFCC00;
STICKLINE(CLOSE REF(CLOSE,1)ANDC O,OPEN,CLOSE,3,0),COLOR000055;;
STICKLINE(CLOSE REF(CLOSE,1)ANDC O,OPEN,CLOSE,2.7,0),COLOR000077;;
STICKLINE(CLOSE REF(CLOSE,1)ANDC O,OPEN,CLOSE,2.1,0),COLOR000099;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLOR0000BB;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLOR0000DD;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLOR0000FF;
STICKLINE(CLOSE=REF(CLOSE,1),H,L,3,1),COLOR999999;
STICKLINE(CLOSE=REF(CLOSE,1),HIGH,LOW,0,0),COLORWHITE;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR555555;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLOR777777;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLOR999999;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLORBBBBBB;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLORDDDDDD;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLORFFFFFF;
STICKLINE(CLOSE REF(CLOSE,1),HIGH,LOW,0,1),COLORCYAN;
STICKLINE(C REF(C,1)ANDC O,C,O,3,0),COLORFFCC00;
STICKLINE(C REF(C,1)ANDC O,OPEN,CLOSE,3,0),COLOR990000;
STICKLINE(C REF(C,1)ANDC O,OPEN,CLOSE,2.7,0),COLORCC0000;
STICKLINE(CLOSE REF(C,1),OPEN,CLOSE,2.1,0),COLORFF4400;
STICKLINE(CLOSE REF(C,1),OPEN,CLOSE,1.5,0),COLORFF8800;
STICKLINE(CLOSE REF(C,1),OPEN,CLOSE,0.9,0),COLORFFCC00;
STICKLINE(CROSS(J,D1)ANDJ 70,CLOSE,OPEN,3.2,0),COLORBB00FF;
STICKLINE(CROSS(J,D1)ANDJ 70,CLOSE,OPEN,2.7,0),COLORFF33FF;
STICKLINE(CROSS(J,D1)ANDJ 70,CLOSE,OPEN,2.1,0),COLORFF66FF;
STICKLINE(CROSS(J,D1)ANDJ 70,CLOSE,OPEN,1.5,0),COLORFF99FF;
STICKLINE(CROSS(J,D1)ANDJ 70,CLOSE,OPEN,0.9,0),COLORFFBBFF;
STICKLINE(CROSS(J,D1)ANDJ 70,CLOSE,OPEN,0.3,0),COLORFFDDFF;