通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
N涨跌幅:=(CLOSE-ref(CLOSE,90))/ref(CLOSE,90)*100;
量价关系:10000000000*N涨跌幅/SUM(VOL,90),linethick0;
STICKLINE(量价关系 =0,量价关系,0,5,0),colorred;
STICKLINE(量价关系 0,0,量价关系,5,0),colorgreen;
支撑价:LLV(LOW,19),COLORGREEN,LINETHICK3;
阻力价:HHV(HIGH,19),COLORBLUE,LINETHICK3;
VAR1:=EMA(CLOSE,12)-EMA(CLOSE,26);
JL01:=MA(C,3);
LJL07:=(3*C+L+O+H)/6;
牛线:(20*LJL07+19*REF(LJL07,1)+18*REF(LJL07,2)+17*REF(LJL07,3)+16*REF(LJL07,4)+15*REF(LJL07,5)+14*REF(LJL07,6)+13*REF(LJL07,7)+12*REF(LJL07,8)+11*REF(LJL07,9)+10*REF(LJL07,10)+9*REF(LJL07,11)+8*REF(LJL07,12)+7*REF(LJL07,13)+6*REF(LJL07,14)+5*REF(LJL07,15)+4*REF(LJL07,16)+3*REF(LJL07,17)+2*REF(LJL07,18)+REF(LJL07,20))/210,COLORRED;
马线:MA(牛线,5),COLORYELLOW,LINETHICK4,POINTDOT;
等待:IF(JL01 =牛线,马线,DRAWNULL),COLORRED,LINETHICK4,POINTDOT;
VAR1L:=(C REF(C,1)ANDC REF(C,2));
VAR2L:=(REF(VAR1L,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR3L:=(REF(VAR2L,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR4L:=(REF(VAR3L,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR5L:=(REF(VAR4L,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR6L:=(REF(VAR5L,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR7L:=(REF(VAR6L,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR8L:=(REF(VAR7L,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR9L:=(REF(VAR8L,1)ANDC =REF(C,1)ANDC =REF(C,2));
VARAL:=(REF(VAR9L,1)ANDC =REF(C,1)ANDC =REF(C,2));
VARBL:=(REF(VARAL,1)ANDC =REF(C,1)ANDC =REF(C,2));
VARCL:=(REF(VARBL,1)ANDC =REF(C,1)ANDC =REF(C,2));
持股:IF(VAR1LORVAR2LORVAR3LORVAR4LORVAR5LORVAR6LORVAR7LORVAR8LORVAR9LORVARALORVARBLORVARCL,牛线,DRAWNULL),COLORRED,LINETHICK1;
VARDL:=(C REF(C,1)ANDC REF(C,2));
VAREL:=(REF(VARDL,1)ANDC =REF(C,1)ANDC =REF(C,2));
VARFL:=(REF(VAREL,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR1L0:=(REF(VARFL,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR1L1:=(REF(VAR1L0,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR1L2:=(REF(VAR1L1,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR1L3:=(REF(VAR1L2,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR1L4:=(REF(VAR1L3,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR1L5:=(REF(VAR1L4,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR1L6:=(REF(VAR1L5,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR1L7:=(REF(VAR1L6,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR1L8:=(REF(VAR1L7,1)ANDC =REF(C,1)ANDC =REF(C,2));
持币:IF(VARDLORVARELORVARFLORVAR1L0ORVAR1L1ORVAR1L2ORVAR1L3ORVAR1L4ORVAR1L5ORVAR1L6ORVAR1L7ORVAR1L8,牛线,DRAWNULL),COLORGREEN,LINETHICK1;
V5日涨跌%:(C-REF(CLOSE,5))/REF(CLOSE,5)*100,COLORWHITE,NODRAW;
V10日涨跌%:(C-REF(CLOSE,10))/REF(CLOSE,10)*100,COLORYELLOW,NODRAW;
V30日涨跌%:(C-REF(CLOSE,30))/REF(CLOSE,30)*100,COLORMAGENTA,NODRAW;
STICKLINE(C =O,C,O,3,0),COLOR000045;
STICKLINE(C =O,C,O,2.5,0),COLOR000065;
STICKLINE(C =O,C,O,2,0),COLOR000085;
STICKLINE(C =O,C,O,1.5,0),COLOR0000A5;
STICKLINE(C =O,C,O,1,0),COLOR0000C5;
STICKLINE(C =O,C,O,0.5,0),COLOR0000E5;
STICKLINE(C =O,H,L,0,0),COLOR0000F5;
STICKLINE(C O,C,O,3,0),COLOR353500;
STICKLINE(C O,C,O,2.5,0),COLOR454500;
STICKLINE(C O,C,O,2,0),COLOR555500;
STICKLINE(C O,C,O,1.5,0),COLOR656500;
STICKLINE(C O,C,O,1,0),COLOR757500;
STICKLINE(C O,C,O,0.5,0),COLOR858500;
STICKLINE(C O,H,L,0,0),COLOR959500;
VAR2:=EMA(VAR1,9);
VAR3:=(CLOSE*2.5/100+CLOSE);
VAR4:EMA(C,3),LINETHICK4,POINTDOT;
VAR5:=LLV(HIGH,240);
VAR6:=100*(CLOSE-VAR5)/VAR5;
VAR7:=REF(LLV(CLOSE,480),1);
VAR8:=REF(HHV(CLOSE,480),1);
VAR9:=100*(CLOSE-VAR7)/(VAR8-VAR7);
VARA:=(CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LLV(CLOSE,981))*100;
VARB:=(CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393))*100;
VARC:=(CLOSE-LLV(LOW,981))/(HHV(HIGH,981)-LLV(LOW,981))*100;
VARD:=(CLOSE-LLV(LOW,393))/(HHV(HIGH,393)-LLV(LOW,393))*100;
VARE:=VARC 98.5ORVARD 98.5;
VARF:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5)/4;
VAR13:=VARA=0ANDVARC=0ANDVAR6 0;
VAR14:=VARA=100ANDVARC=100;
VAR15:=VARB=0ORVARD=0ANDVAR9 0;
VAR16:=VARB=100ANDVARD=100;
VAR17:=VAR6 0ANDVAR9 0;
VAR18:=VAR13ANDVAR15;
VAR19:=VAR14ANDVAR16;
VAR1B:=SMA(MAX(CLOSE-REF(CLOSE,1),0),49,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
VAR1C:=SMA(MAX(CLOSE-REF(CLOSE,1),0),14,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),14,1)*100;
VAR1D:=BARSCOUNT(CLOSE);
VAR1E:=VAR1B 20ANDVAR1C 23ANDVAR1D 35;
VAR1F:=VAR1EANDCOUNT(VAR1E,1)=1;
VAR20:=REF(CLOSE,1);
VAR21:=SMA(MAX(CLOSE-VAR20,0),34,1)/SMA(ABS(CLOSE-VAR20),7,1)*100;
VAR22:=SMA(MAX(CLOSE-VAR20,0),13,1)/SMA(ABS(CLOSE-VAR20),13,1)*100;
VAR23:=BARSCOUNT(CLOSE);
VAR24:=VAR21 20ANDVAR22 23ANDVAR23 35;
VAR25:=VARA=0ANDVARF 1.2ANDVAR17;
VAR27:=VAR18ANDVARF 1.2ANDVAR17;
VAR29:=SUM(HIGH-OPEN,77)/SUM(OPEN-LOW,77)*100;
VAR2A:=SUM(MAX(0,HIGH-REF(CLOSE,1)),77)/SUM(MAX(0,REF(CLOSE,1)-LOW),77)*100;
VAR2B:=CROSS(VAR29,69)ANDCROSS(VAR2A,80) 150;
VAR2C:=VAR24ANDVAR1FANDCOUNT(VAR24,30)=1;
买点:=VAR25ANDVAR2B;
绝对卖点:=(VAR19ORVARA)ANDVARF 23ORVARE;
VAR2D:=VAR1FANDVAR2CANDVAR25;
股海万元户:=(CLOSE/REF(CLOSE,1) 1.04AND(CLOSE 10.8ANDCLOSE 10.83ORCLOSE 6.86ANDCLOSE 6.88ORCLOSE 13.82ANDCLOSE 13.84ORCLOSE 7.28ANDCLOSE 7.3ORCLOSE 12.4ANDCLOSE 12.42ORCLOSE 22.33ANDCLOSE 22.35ORCLOSE 4.68ANDCLOSE 4.7ORCLOSE 26.29ANDCLOSE 26.31ORCLOSE 7.65ANDCLOSE 7.67ORCLOSE 13.4ANDCLOSE 13.42ORCLOSE 7.58ANDCLOSE 7.6ORCLOSE 20.43ANDCLOSE 20.45ORCLOSE 19.57ANDCLOSE 19.59ORCLOSE 6.26ANDCLOSE 6.28ORCLOSE 7.14ANDCLOSE 7.16ORCLOSE 6.61ANDCLOSE 6.63ORCLOSE 11.9ANDVOL 11.92ORCLOSE 6.7ANDCLOSE 6.72ORCLOSE 8.19ANDCLOSE 8.21));
DRAWTEXT(FILTER(绝对卖点 0,3),H, 风险 ),COLOR00FF00;
DRAWTEXT(股海万元户 0,L, ☆追涨 ),COLORYELLOW;
DRAWICON(买点 0,L,4);
DRAWTEXT(买点 0,L, 扫描神针 ),COLORF00FF0;
DRAWTEXT(VARF 0.7ANDVAR27ANDVAR25 0,L, ),COLORYELLOW;
STICKLINE(VAR2D 0,O,C,10,0),COLORYELLOW;
DRAWTEXT(VAR2D 0,L, 大方神针 ),COLORRED;
DRAWICON(COUNT(REF(VAR4,1) REF(VAR4,2),5)=5ANDVAR4 REF(VAR4,1),L*0.98,5);
DRAWICON(FILTER(COUNT(VAR6 0,5)ANDCROSS(VAR6,0)ANDVARF REF(VARF,1)ANDC O,3),L,11);
DRAWICON(FILTER(REF(VAR4,1) REF(VAR4,2)ANDVAR4 REF(VAR4,1)ANDVARF 17ANDVAR1 VAR2,5),H,12);
DRAWICON(阻力价 REF(阻力价,1)ANDCROSS(阻力价,VAR3)ANDC O,H*1.02,6);
Y:=CLOSE/REF(CLOSE,1) 1.07;
X:=VOL MA(VOL,5);
A1:=YANDX;
DRAWTEXT(A1,MA(CLOSE,5), 攻 ),COLORMAGENTA;
Z:=CLOSE/REF(CLOSE,1) 0.93;
W:=VOL MA(VOL,5);
A2:=ZANDW;
DRAWTEXT(A2,MA(CLOSE,5), 小心跌停 ),COLORGREEN;
AA05:MA(C,5),LINETHICK3,COLOR0099CC;
五日乖离率:=(C-AA05)/AA05*100;
BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);
加速度5:EMA((速度5-REF(速度5,1)),3),NODRAW;
IF(BB05 30ANDAA05 REF(AA05,1),AA05,DRAWNULL),LINETHICK3,colorcyan;
AA10:MA(C,10);AA20:=MA(C,20);
BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
IF(BB05 0ANDAA05 REF(AA05,1),AA05,DRAWNULL),LINETHICK3,coloryellow;
AA30:MA(C,30);
三拾日乖离率:(C-AA30)/AA30*100,NODRAW;
VAR1:=(AA20-AA30) REF((AA20-AA30),1)ANDAA20 REF(AA20,1)ANDAA30 REF(AA30,1);
VAR2:=(AA30-AA20) REF((AA30-AA20),1)ANDAA20 REF(AA20,1)ANDAA30 REF(AA30,1);
BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;
IF(BB30 15ANDAA30 REF(AA30,1),AA30,DRAWNULL),LINETHICK3,COLORFF00FF;
强势狙击:=FILTER(BB30 30ANDBB10 45ANDCROSS(BB05,60),10);
加仓:=FILTER(COUNT(CROSS(BB05,30),5) =1ANDAA05 REF(AA05,1)AND三拾日乖离率 REF(三拾日乖离率,1)ANDAA10 REF(AA10,1)
AND加速度5 REF(加速度5,1)AND速度5 REF(速度5,1),10);
清仓:=FILTER(COUNT(CROSS(30,BB05),5) =1AND(C AA30ORO AA30)ANDAA05 REF(AA05,1)AND三拾日乖离率 REF(三拾日乖离率,1)ANDAA10 REF(AA10,1),10);
DRAWTEXT(加仓,LOW*0.98, ←加仓 ),colorred;
JC:=CROSS(0,五日乖离率)AND三拾日乖离率 REF(三拾日乖离率,1)ANDAA10 REF(AA10,1);
减仓:=FILTER(JC,10);
MR:=COUNT(CROSS(五日乖离率,0),3) =1AND三拾日乖离率 REF(三拾日乖离率,1)ANDAA05 REF(AA05,1)AND(C/REF(C,1)-1)*100 5ANDREF(C,1) AA30;
买入:=FILTER(MR,10);
DRAWTEXT(减仓,HIGH*1.02, ←减仓 ),colorcyan;
DRAWTEXT(买入,LOW*0.98, ←买入 ),coloryellow;
DRAWTEXT(清仓,HIGH*1.02, ←清仓 ),colorgreen;
DRAWTEXT(强势狙击,LOW*0.98, ←强势狙击 ),coloryellow;
VAR21:=MAX(ABS(HIGH-AMOUNT/VOL/100),ABS(AMOUNT/VOL/100-LOW));
VAR3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);
MV:=(VAR21+VAR3)/AMOUNT*VOL*100*50;
DRAWTEXT(MV 6ANDL =LLV(L,10),L*0.95, ←异动 ),colorcyan;
VAR3:=VOL/CAPITAL*100;
VAR4:=CLOSE/OPEN;
短期兵力:EMA(VAR3*VAR4,9)*44.545*0.999,LINETHICK0,COLORFFFFFF;
中期兵力:EMA(VAR3*VAR4,33)*44.545*0.999,LINETHICK0,COLOR00FFFF;
长期兵力:EMA(VAR3*VAR4,61)*44.545*0.999,LINETHICK0,COLOR00FF00;
预备兵力:EMA(VAR3*VAR4,120)*44.545*0.888,LINETHICK0,COLORF00FF0;
VAR5:=EMA(100*(HHV(HIGH,20)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,33)),20);
VAR6:=EMA(VAR5,1);
VAR7:=VOL/CAPITAL*100;
VAR8:=SUM(VAR7,5)
VAR9:=VAR8/REF(VAR7,10)
VARA:=HHV(CLOSE,5);
VARB:=VARA/REF(CLOSE,5) =1.01;
VARC:=VAR6
VARD:=HIGH/REF(LOW,20)
VARE:=WINNER(CLOSE)*100;
VARF:=VAR8ANDVARCANDVAR9ANDVAR3ANDVARB;
VAR10:=FILTER(VARF,20);
★:IF(VAR10,中期兵力*1.5,中期兵力),LINETHICK4,POINTDOT,COLOR0000FF;
中期兵力,POINTDOT,COLOR000000;
AA:短期兵力,LINETHICK0,COLORFFFFFF;
BB:中期兵力,LINETHICK0,COLOR00FFFF;
CC:长期兵力,LINETHICK0,COLOR00FF00;
DD:预备兵力,LINETHICK0,COLORF00FF0;
公式解读:
编写条件:
大于2时日的公式。
编写方法:
XG:V/CAPITAL*100*(V REF(ma(V,5),1)*2);