通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
DRAWNUMBER(ISLASTBAR,C,C),COLORMAGENTA;
SJTJ:=DATE 1590301;
X1:=(C+L+H)/3;
X2:=EMA(X1,6);
X3:=EMA(X2,5);
{DRAWICON(CROSS(X2,X3),L-1,7);
DRAWICON(CROSS(X3,X2),H+1,8);}
STICKLINE(X2 =X3ANDSJTJ,LOW,HIGH,0,1),COLORRED;
STICKLINE(X2 =X3ANDSJTJ,CLOSE,OPEN,3.2,2),COLORRED;
STICKLINE(X2 X3ANDSJTJ,LOW,HIGH,0,1),COLORGREEN;
STICKLINE(X2 X3ANDSJTJ,CLOSE,OPEN,3.2,2),COLORGREEN;
STICKLINE(CROSS(X3,X2)ANDSJTJ,OPEN,CLOSE,3.2,0),COLORGREEN;
STICKLINE(CROSS(X2,X3)ANDSJTJ,OPEN,CLOSE,3.2,0),COLORRED;
STICKLINE((CLOSE OPEN)AND(X2 X3)ANDSJTJ,CLOSE,OPEN,3.2,2)COLORGREEN;
STICKLINE((CLOSE OPEN)AND(X2 =X3)ANDSJTJ,CLOSE,OPEN,3.2,2)COLORRED;
STICKLINE((CLOSE OPEN)AND(X2 X3)ANDSJTJ,CLOSE,OPEN,3.2,0)COLORGREEN;
STICKLINE((CLOSE OPEN)AND(X2 =X3)ANDSJTJ,CLOSE,OPEN,3.2,0)COLORRED;
做空:IF(SAR(10,2,20) =H,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORBLUE;
做多:IF(SAR(10,2,20) =L,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORRED;
操盘线:=EMA(EMA(EMA(CLOSE,2),2),2);
线:(MA(操盘线,5)),COLORGREEN,LINETHICK2;
IF(趋势线 REF(趋势线,1),趋势线,DRAWNULL),COLORRED,LINETHICK2;
IF(趋势线 REF(趋势线,1),趋势线,DRAWNULL),COLORGREEN,LINETHICK2;
最新价:IF(SJTJ,C,DRAWNULL),LINETHICK0,COLORYELLOW;
LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE-LC),0),5,1)/SMA(ABS((CLOSE-LC)),5,1))*100);
TR1:=SUM(MAX(MAX((HIGH-LOW),ABS((HIGH-REF(CLOSE,1)))),ABS((LOW-REF(CLOSE,1)))),10);
HD:=(HIGH-REF(HIGH,1));
LD:=(REF(LOW,1)-LOW);
DMP:=SUM(IF(((HD 0)AND(HD LD)),HD,0),10);
DMM:=SUM(IF(((LD 0)AND(LD HD)),LD,0),10);
PDI:=((DMP*100)/TR1);
MDI:=((DMM*100)/TR1);
ADX:=MA(((ABS((MDI-PDI))/(MDI+PDI))*100),5);
AV:=(RSI5+ADX);
DXR:=(((ADX+REF(ADX,5))/2)+RSI5);
0,COLORFF00FF;
WR10:=((100*(HHV(HIGH,10)-CLOSE))/(HHV(HIGH,13)-LLV(LOW,13)));
NEWVOL:=(RSI5-WR10);
阶段底部:=(AV+NEWVOL);
趋势线:=LLV(阶段底部,1),COLORWHITE,LINETHICK0;
STICKLINE(CROSS(阶段底部,0),0,-10,0.1,1),LINETHICK6,COLORRED;
STICKLINE((趋势线 230),100,90,0.1,1),LINETHICK6,COLORGREEN;
Y1:=LLV(L,17);
Y2:=SMA(ABS(L-REF(L,1)),17,1);
Y3:=SMA(MAX(L-REF(L,1),0),17,2);
Q:=-(EMA(IF(L =Y1,Y2/Y3,-3),1));
STICKLINE(CROSS(Q,0),15,0,4,0),,COLORYELLOW;
强拉升:IF(CROSS(Q,0),1,0),COLORYELLOW;
Q1:=(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100,,COLOR00FF00,LINETHICK2;
STICKLINE(CROSS(Q1,-24),20,0,4,0),,COLORMAGENTA;
加强拉升:IF(CROSS(Q1,-24),1,0),COLORMAGENTA;
VAR1:=EMA(EMA(CLOSE,9),9);
控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
VAR2:=EXPMA(EXPMA(EXPMA((2*CLOSE+HIGH+LOW)/4,4),4),4);
天:=(MA((VAR2-REF(VAR2,1))/REF(VAR2,1)*100,2));
地:=(MA((VAR2-REF(VAR2,1))/REF(VAR2,1)*100,1));
STICKLINE(地 天AND地 0,10,0,1,0),COLORRED;
开始拉升:STICKLINE(地 天AND地 0,10,0,1,0)=1,COLORRED;
LOWV:=LLV(LOW,9);
HIGHV:=HHV(HIGH,9);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);
K:EMA(RSV,3);
D:MA(K,3);
STICKLINE(K D,K,D,1.1,0),COLORRED,LINETHICK2;
STICKLINE(D K,K,D,1.1,0),COLORGREEN,LINETHICK2;
线:90,COLORGREEN;
线:10,COLORGREEN;
警戒:阶段底部 0,LINETHICK0,COLORYELLOW;
出击:CROSS(阶段底部,0),LINETHICK0,COLORRED;
R1:=1;
R2:=((((2*CLOSE)+HIGH)+LOW)/4);
R4:=LLV(LOW,5);
R5:=HHV(HIGH,4);
C1:=(EMA((((R2-R4)/(R5-R4))*100),4)*R1),COLORFF00FF,LINETHICK2;
C2:=(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*R1),COLORFFFFFF,LINETHICK2;
条:=CROSS(C1,C2)ANDC1
STICKLINE(条,0,-10,2,0),COLORRED;
DRAWTEXT(条,20, 出枪 ),COLORYELLOW;
A10:=CROSS(控盘,0);
无庄控盘:IF(控盘 0,控盘,0),COLORWHITE,NODRAW;
开始控盘:IF(A10,20,0),LINETHICK1,COLORYELLOW;
AAZ2:=(MIN(O,C)-L)/L*100
BBZ2:=L/MA(C,30) 1.03ANDL/MA(C,30) 0.99ANDC
准备抓:IF(AAZ2ANDBBZ2,20,0);
DRAWTEXT(AAZ2ANDBBZ2,20, 准备 )COLORLIBLUE;
公式解读:
VARD:=REF(LOW,1);
VARE:=SMA(ABS(VARC-VARD),3,1)/SMA(MAX(VARC-VARD,0),3,1)*100;
VARF:=MA(VARE/10,3);
VAR10:=LLV(LOW,30);
VAR11:=HHV(VARF,30);
MA(IF(LOW =VAR10,(VARF+VAR11*2)/2,0),3);
VAR1B:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2B:=SMA(ABS(LOW-VAR1B),13,1)/SMA(MAX(LOW-VAR1B,0),10,1);
VAR3B:=EMA(VAR2B,10);
VAR4B:=LLV(LOW,33);
VAR5B:=EMA(IF(LOW =VAR4B,VAR3B,0),3);
主⼒进场:IF(VAR5B REF(VAR5B,1),VAR5B,0),COLORRED;
STICKLINE(VAR5B REF(VAR5B,1),0,VAR5B,3,0),COLORRED;
洗盘:IF(VAR5B REF(VAR5B,1),VAR5B,0),COLORGREEN;
VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
VAR3:=EMA(VAR2,10);
VAR4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW =VAR4,VAR3,0),3);
STICKLINE(VAR5 REF(VAR5,1),0,VAR5,6,0),COLORGREEN;
STICKLINE(VAR5 REF(VAR5,1),0,VAR5,6,0),COLORRED;
主⼒阵地:VAR5 REF(VAR5,4){ANDC REF(C,1)},COLORFFFF00;
VAR2C:=(HIGH+LOW+CLOSE*2)/4;
VAR3C:=EMA(VAR2C,7);
VAR4C:=STD(VAR2C,7);
VAR5C:=(VAR2C-VAR3C)*100/VAR4;
VAR6C:=EMA(VAR5C,3);
WW:(EMA(VAR6C,5)+100)/2-3,COLORFF00FF;
MM:HHV(WW,3),COLORFF3333;
AAA:=AMOUNT/VOL/100;
{东财主⼒阵地}
X:=C =0.998*MA(C,120)ANDMA(C,120) =REF(MA(C,120),1);
Y:=MA(C,40) =REF(MA(C,40),1);
Z:=MA(C,60) MA(C,120);
WR:=100*(HHV(HIGH,10)-CLOSE)/(HHV(HIGH,10)-LLV(LOW,10));
A:=WR-80;
AA:=MAX(A,0);
B:=(C/MA(C,60))-1;
CC:=1-B;
D:=MAX(AA*Z,0);
STICKLINE(D 0.01,0,D,1,0),COLORYELLOW;
E:=MA(C,2)-MA(C,10);
F:=MA(E,2);
STICKLINE(E FANDYANDREF(D,1) =9,0,D+9,1,0),COLORRED;
STICKLINE(MA(C,40) =REF(MA(C,40),1),0,1,1,0),COLORLIMAGENTA;
STICKLINE(MA(C,40) REF(MA(C,40),1),0,1,1,0),COLORGREEN;
主⼒防御:IF(E FANDYANDREF(D,1) =9,0,D),NODRAW,COLORYELLOW;
主⼒出击:IF(E FANDYANDREF(D,1) =9,D+9,0),NODRAW,COLORRED;
战⽃阶段:IF(MA(C,40) =REF(MA(C,40),1),1,0),NODRAW,COLORLIMAGENTA;
休整阶段:IF(MA(C,40) =REF(MA(C,40),1),0,1),NODRAW,COLORGREEN;
30,COLORBLACK;
VAR1:=EMA(SMA((CLOSE-LLV(LOW,19))/(HHV(HIGH,19)-LLV(LOW,19))*100,8,1)
,3);
STICKLINE(VAR1 20ANDVAR1 80,VAR1,VAR1,10,1),COLORRED;
STICKLINE(VAR1 REF(VAR1,1),VAR1,VAR1,10,1),COLORFFCC66;
STICKLINE(VAR1 80,VAR1,VAR1,8,1),COLOR00FF00;
STICKLINE(VAR1 20,VAR1,VAR1,8,1),COLORYELLOW;
ABV:=MA(SUM(IF(CLOSE REF(CLOSE,1),VOL,IF(CLOSE REF(CLOSE,1),-VOL,0)),
0)/25000,2);
M1:=EMA(ABV,12);
M2:=EMA(ABV,26);
MTM:=CLOSE-REF(CLOSE,1);
MMS:=((100)*(EMA(EMA(MTM,6),6)))/(EMA(EMA(ABS(MTM),6),6));
MMM:=((100)*(EMA(EMA(MTM,12),12)))/(EMA(EMA(ABS(MTM),12),12));
MML:=((100)*(EMA(EMA(MTM,26),26)))/(EMA(EMA(ABS(MTM),26),26));
MTGJ:=C-REF(C,1);
ZLGJ:=100*EMA(EMA(MTGJ,9),9)/EMA(EMA(ABS(MTGJ),9),9);
MAZL:=MA(ZLGJ,5);
A:=((VOL)/(CAPITAL))*(100);
S:=((MA(A,30))/(MA(INDEXA,10)))*(MA(INDEXA,60));
Y:=((MA(A,120))/(MA(INDEXA,10)))*(MA(INDEXA,60));
X:=1;
V1:=(HIGH+OPEN+LOW+(2)*(CLOSE))/(5);
V2:=REF(V1,1);
V3:=MAX(V1-V2,0);
V4:=ABS(V1-V2);
V5:=SMA(V3,10,1);
V6:=SMA(V4,10,1);
V8:=COUNT(((V5)/(V6) 0.2),5);
V9:=COUNT((LLV(V1,10)=V1),10);
主力进出:IF((MMS REF(MMS,1)ANDZLGJ REF(ZLGJ,1)ANDCROSS(ABV,M2)AND
ABV REF(ABV,1)ANDM1 REF(M1,1)AND
M2 REF(M2,1)),65,0),COLORWHITE,POINTDOT;
主进主轨:=ABV M2ANDCROSS(ABV,M1)ANDCROSS(ZLGJ,MAZL);
STICKLINE(主力进出OR主进主轨,65,0,2,1),COLORWHITE;
精准:=V8 =1ANDV9 =1ANDCLOSE OPENANDREF(CLOSE,1) REF(OPEN,1)
AND(VOL REF(VOL,1))ANDMMS MMLANDCROSS(ABV,M2);
买点:=V8 =1ANDV9 =1ANDCLOSE OPENANDREF(CLOSE,1) REF(OPEN,1)
AND(VOL REF(VOL,1))ANDCROSS(MMS,MML)ANDABV REF(ABV,1);
买点:=V8 =1ANDV9 =1ANDCLOSE OPENANDREF(CLOSE,1) REF(OPEN,1)
AND(VOL REF(VOL,1))ANDABV REF(ABV,1)ANDMMS MMLANDCROSS(MMM,MML)
ANDMMS REF(MMS,1)ANDMMM REF(MMM,1)ANDMML REF(MML,1);
主进主买:=ABV M2ANDZLGJ MAZLANDCROSS(MMS,MML)ANDMMS REF(MMS,1)AND
MMM REF(MMM,1)ANDMML REF(MML,1);
短中精:=精准买卖OR短线买点OR中线买点OR主进主买;
主力买卖:IF(短中精,60,0),COLORFF00FF,POINTDOT;
STICKLINE(主力买卖,60,0,2,1),COLORFF00FF;
主力轨迹:IF(ABV M2ANDMMS MMLANDCROSS(ZLGJ,MAZL)ANDZLGJ REF(ZLGJ,1)
ANDMAZL REF(MAZL,1),55,0),COLORFFCC66,POINTDOT;
STICKLINE(主力轨迹,55,0,2,1),COLORFFCC66;
拉升在即:IF(S XANDY XANDMMS MMLANDABV M1AND
CROSS(S,Y),50,0),COLORYELLOW,POINTDOT;
STICKLINE(拉升在即,50,0,2,1),COLORYELLOW;
底部构成:IF(V8 =1ANDV9 =1ANDCLOSE OPENANDREF(CLOSE,1) REF(OPEN,1)
ANDVOL REF(VOL,1)ANDABV M2ANDZLGJ MAZL,45,0),COLOR00FF00,POINTDOT;
STICKLINE(底部构成,45,0,2,1),COLOR00FF00;
ROC:=(CLOSE-REF(CLOSE,12))/REF(CLOSE,12)*100;
HSL:=100*VOL/CAPITAL;
冲击波:IF(CROSS(ROC,16)ANDHSL 3.5,40,0),COLOR0099FF,POINTDOT;
STICKLINE(冲击波,40,0,2,1),COLOR0099FF;