通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
公式解读:
M1:=3;M2:=6;M3:=12;M4:=24;
BBI:(MA(CLOSE,M1)+MA(CLOSE,M2)+MA(CLOSE,M3)+MA(CLOSE,M4))/4,COLORGRAY,DOTLINE;
IF(BBI REF(BBI,1),BBI,DRAWNULL),DOTLINE,COLORYELLOW;
IF(BBI REF(BBI,1),BBI,DRAWNULL),DOTLINE,COLORGRAY;
涨停:=IF((C-REF(C,1))*100/REF(C,1) =(10-0.01*100/REF(C,1)),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(涨停,H,L,0,0),COLORYELLOW;
ZT:=C/REF(C,1) 1.099ANDC=H;
AA:=REF(C,BARSLAST(ZTANDCURRBARSCOUNT 60));
ABA:=REF((C/REF(C,1) =1.095ANDC=H),1) ANDO REF(C,1)ANDC OANDO=HANDV=HHV(V,34);
BAB:=REF(O,BARSLAST(ABAANDCURRBARSCOUNT 60));
SAT:=(AMOUNT/C)/(HHV(AMOUNT,120)/HHV(C,120));
饱和:=IF(SAT 1,1,SAT)*100;
倒灌:=REF((C/REF(C,1) =1.099ANDC=H),1)AND量能饱和 75 ANDO REF(C,1)ANDC OANDO
BAB1:=REF(H,BARSLAST(倒灌ANDCURRBARSCOUNT 90));
DD:=ABS((CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100)
DRAWTEXT(DD,H*1.02, ),COLORGREEN,LINETHICK3;
ZTCS:=COUNT(涨停,BARSLAST(涨停+1));
ZTCS90:=COUNT(涨停,90);
DRAWNUMBER(涨停,HIGH*1.04,ZTCS90),COLORYELLOW;
个线:=EMA(EMA(CLOSE,30),9);
大线:=EMA(EMA(INDEXC,45),9);
个股1:=CLOSE/个线*100;
1:=INDEXC/大线*100;
GGQD:=(个股1-大盘1);
N1:=REF(BARSLAST((C-REF(C,1))/REF(C,1)*100 9.6ANDC=H),1)+1;
回光返照:=COUNT(CROSS(MA(C,15),MA(C,5)),N1)=0ANDHHV(GGQD,20) 23ANDMA(C,5) MA(C,30)ANDGGQD HHV(GGQD,30)ANDGGQD 5AND(C-REF(C,1))/REF(C,1)*100 9.6ANDC=H,;
ZT9:=(C-REF(C,1))/REF(C,1)*100 9.5,COLORWHITE;
开盘:=IF(REF(ZT9,1) 0,(O-REF(C,1))/REF(C,1)*100,0),NODRAW;
BIAS1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
BIA:=(BIAS1-BIAS2);
BIS:=LLV(BIAS1,3);
超跌涨停:=ZT9 0ANDBIS 0ANDBIA 5ANDMA(C,5) MA(C,60);
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
MA60:=MA(C,34);
F1:=(MA5-MA10)/MA10*100;
F2:=(MA10-MA20)/MA10*100;
F3:=(MA20-MA60)/MA10*100;
拉升涨停:=F1 1ANDF2 3ANDF3 0ANDZT
A1:=REF(C,20)=HHV(C,2*20+1);B1:=FILTER(A1,20);C1:=BACKSET(B1,20+1);HD:=FILTER(C1,20);
A:=REF(H,BARSLAST(HD));
RSI1:=SMA(MAX(CLOSE-REF(CLOSE,1),0),5,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),5,1)*100;
钝化涨停:=ZT 0ANDRSI1=HHV(RSI1,5)ANDRSI1
钝化涨停1:=GGQD 15ANDZT 0ANDRSI1=HHV(RSI1,5)ANDRSI1 80ANDREF(GGQD 15ANDZT 0ANDRSI1=HHV(RSI1,5)ANDRSI1 80,1)=0;
新股首次:=COUNT(ZT 0,BARSCOUNT(C))=1ANDZT 0ANDFINANCE(42)
涨停:=CROSS(C,A)ANDZT
DRAWTEXT(回光返照,L*0.93, ↖回光返照 ),COLORBLUE;
DRAWTEXT(突破涨停,L*0.99, ↖突破涨停 ),COLORYELLOW;
STICKLINE(涨停,OPEN,CLOSE,3,0),COLORRED;
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(涨停,H,L,0,0),COLORYELLOW;
倒拔杨柳:DRAWLINE(ABA,O,1,REF(BAB,1),1),COLORLIGRAY;
普通倒灌:DRAWLINE(倒灌,H,1,REF(BAB1,1),1),COLORLIGRAY;
DRAWICON(CROSS(C,倒拔杨柳),倒拔杨柳*1,11);
DRAWICON(CROSS(C,普通倒灌),普通倒灌*1,11);
N:=13;P:=4;RN:=27;
VVAR1:=(MA(CLOSE,80)-MA(CLOSE,13)/3);
VVAR2:=(MA((CLOSE-VVAR1)/VVAR1,1));
VVAR3:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100;
VVAR4:=SMA(VVAR3,4,1);
MMA:=EMA(VVAR2,12)*0.7;
MMB:=EMA(VVAR2,3);
快到底:=IF(LLV(MMB-MMA,12) 0,0,-20),LINETHICK2,COLORGREEN;
底初:=IF(CROSS(0,LLV(MMB-MMA,12)),10,0),LINETHICK0;
K:=CEILING(C/10);
DIFF:=(EMA(CLOSE,12)-EMA(CLOSE,26))/K*100+50;
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA)+50;
LC:=REF(CLOSE,1);
RA1:=REF(RSI,N)=HHV(RSI,N*2+1);RA2:=REF(RSI,N)=LLV(RSI,N*2+1);
RB1:=FILTER(RA1,N);RB2:=FILTER(RA2,N);
RC1:=BACKSET(RB1,N+1);RC2:=BACKSET(RB2,N+1);
RD1:=FILTER(RC1,N);RD2:=FILTER(RC2,N);
GD1:=BARSLAST(RD1);DD1:=BARSLAST(RD2);
GDTS:=IF(RD1,CURRBARSCOUNT,0);
DDTS:=IF(RD2,CURRBARSCOUNT,0);
GDT1:=IF(GD1,REF(GDTS,GD1),GDTS);
DDT1:=IF(DD1,REF(DDTS,DD1),DDTS);
GDCS1:=CONST(GDT1);DDCS1:=CONST(DDT1);
GINGBUTS1:=REF(GDT1,GD1+1);DINGBUTS1:=REF(DDT1,DD1+1);
GDCS2:=CONST(GINGBUTS1);DDCS2:=CONST(DINGBUTS1);
GDCS13:=CONST(REF(RSI,GDCS1-1));DDCS13:=CONST(REF(RSI,DDCS1-1));
GDCS23:=CONST(REF(RSI,GINGBUTS1-1));DDCS23:=CONST(REF(RSI,DINGBUTS1-1));
XG1:=BACKSET(ISLASTBAR,GDCS1);XD1:=BACKSET(ISLASTBAR,DDCS1);
XG2:=BACKSET(ISLASTBAR,GDCS2);XD2:=BACKSET(ISLASTBAR,DDCS2);
M:=2*N;
RA11:=REF(RSI,M)=HHV(RSI,M*2+1);RA22:=REF(RSI,M)=LLV(RSI,M*2+1);
RB11:=FILTER(RA11,M);RB22:=FILTER(RA22,M);
RC11:=BACKSET(RB11,M+1);RC22:=BACKSET(RB22,M+1);
RD11:=FILTER(RC11,M);RD22:=FILTER(RC22,M),NODRAW;
GD11:=BARSLAST(RD11);DD11:=BARSLAST(RD22);
GDTSS:=IF(RD11,CURRBARSCOUNT,0);
DDTSS:=IF(RD22,CURRBARSCOUNT,0);
GDT11:=IF(GD11,REF(GDTSS,GD11),GDTSS);
DDT11:=IF(DD11,REF(DDTSS,DD11),DDTSS);
GDCS11:=CONST(GDT11);DDCS11:=CONST(DDT11);
GINGBUTS11:=REF(GDT11,GD11+1);DINGBUTS11:=REF(DDT11,DD11+1);
GDCS22:=CONST(GINGBUTS11);DDCS22:=CONST(DINGBUTS11);
{↓方案一,射箭封神的显示部份↓}
STICKLINE(MACD =50,50,MACD,3,0),COLOR000055;
STICKLINE(MACD 50,50,MACD,3,0),COLOR555555;
DRAWBAND(DIFF,RGB(100,00,00),DEA,RGB(00,200,00));
RSI:((SMA(MAX((CLOSE-LC),0),P,1)/SMA(ABS((CLOSE-LC)),P,1))
*100),COLORMAGENTA,LINETHICK2;
80,COLORCYAN,LINETHICK1;
:IF(快到底 0ANDCROSS(MACD,50)ANDVVAR4 18,80,20),COLORCYAN;
高点压力1:DRAWLINE(CURRBARSCOUNT=GDCS2,RSI
,CURRBARSCOUNT=GDCS1,RSI,1),COLORRED,LINETHICK2;
低点支撑1:DRAWLINE(CURRBARSCOUNT=DDCS2,RSI
,CURRBARSCOUNT=DDCS1,RSI,1),COLORRED,LINETHICK2;
高点压力2:DRAWLINE(CURRBARSCOUNT=GDCS22,RSI
,CURRBARSCOUNT=GDCS11,RSI,1),COLORYELLOW,LINETHICK2;
低点支撑2:DRAWLINE(CURRBARSCOUNT=DDCS22,RSI
,CURRBARSCOUNT=DDCS11,RSI,1),COLORYELLOW,LINETHICK2;
高点压力3:DRAWLINE(CURRBARSCOUNT=GDCS22,RSI
,CURRBARSCOUNT=GDCS2,RSI,1),COLORGREEN,LINETHICK2;
低点支撑3:DRAWLINE(CURRBARSCOUNT=DDCS22,RSI
,CURRBARSCOUNT=DDCS2,RSI,1),COLORGREEN,LINETHICK2;
VAR1:=( 399139$C
VAR2:=( 399190$C
VAR3:=( 399132$C
VAR4:=( 399150$C
VAR5:=( 399138$C
VAR6:=( 399200$C
VAR7:=( 399110$C
VAR8:=( 399136$C
VAR9:=( 399135$C
VAR10:=( 399130$C
VAR11:=( 399160$C
VAR12:=IF(C 100,C,( 999999$C ));
VAR13:=( 399137$C
医药:=SUM((VAR1/REF(VAR1,1)-1)*100,0)*10;
金融:=SUM((VAR2/REF(VAR2,1)-1)*100,0)*10;
纺织:=SUM((VAR3/REF(VAR3,1)-1)*100,0)*10;
建筑:=SUM((VAR4/REF(VAR4,1)-1)*100,0)*10;
机械:=SUM((VAR5/REF(VAR5,1)-1)*100,0)*10;
地产:=SUM((VAR6/REF(VAR6,1)-1)*100,0)*10;
农林:=SUM((VAR7/REF(VAR7,1)-1)*100,0)*10;
电子:=SUM((VAR8/REF(VAR8,1)-1)*100,0)*10;
石化:=SUM((VAR9/REF(VAR9,1)-1)*100,0)*10;
制造:=SUM((VAR10/REF(VAR10,1)-1)*100,0)*10;
运输:=SUM((VAR11/REF(VAR11,1)-1)*100,0)*10;
上证:=SUM((VAR12/REF(VAR12,1)-1)*100,0)*10;
金属:=SUM((VAR13/REF(VAR13,1)-1)*100,0)*10;
医药B:=REF(SUM((VAR1/REF(VAR1,1)-1)*100,0)*10,1);
金融B:=REF(SUM((VAR2/REF(VAR2,1)-1)*100,0)*10,1);
纺织B:=REF(SUM((VAR3/REF(VAR3,1)-1)*100,0)*10,1);
建筑B:=REF(SUM((VAR4/REF(VAR4,1)-1)*100,0)*10,1);
机械B:=REF(SUM((VAR5/REF(VAR5,1)-1)*100,0)*10,1);
地产B:=REF(SUM((VAR6/REF(VAR6,1)-1)*100,0)*10,1);
农林B:=REF(SUM((VAR7/REF(VAR7,1)-1)*100,0)*10,1);
电子B:=REF(SUM((VAR8/REF(VAR8,1)-1)*100,0)*10,1);
石化B:=REF(SUM((VAR9/REF(VAR9,1)-1)*100,0)*10,1);
制造B:=REF(SUM((VAR10/REF(VAR10,1)-1)*100,0)*10,1);
运输B:=REF(SUM((VAR11/REF(VAR11,1)-1)*100,0)*10,1);
上证B:=REF(SUM((VAR12/REF(VAR12,1)-1)*100,0)*10,1);
金属B:=REF(SUM((VAR13/REF(VAR13,1)-1)*100,0)*10,1);
BVAR17:=CONST(MA(医药B,RN));
BVAR18:=CONST(MA(金融B,RN));
BVAR19:=CONST(MA(纺织B,RN));
BVAR20:=CONST(MA(建筑B,RN));
BVAR21:=CONST(MA(机械B,RN));
BVAR22:=CONST(MA(地产B,RN));
BVAR23:=CONST(MA(农林B,RN));
BVAR24:=CONST(MA(电子B,RN));
BVAR25:=CONST(MA(石化B,RN));
BVAR26:=CONST(MA(制造B,RN));
BVAR27:=CONST(MA(运输B,RN));
BVAR28:=CONST(MA(上证B,RN));
BVAR29:=CONST(MA(金属B,RN));
VAR17:=CONST(MA(医药,RN));
VAR18:=CONST(MA(金融,RN));
VAR19:=CONST(MA(纺织,RN));
VAR20:=CONST(MA(建筑,RN));
VAR21:=CONST(MA(机械,RN));
VAR22:=CONST(MA(地产,RN));
VAR23:=CONST(MA(农林,RN));
VAR24:=CONST(MA(电子,RN));
VAR25:=CONST(MA(石化,RN));
VAR26:=CONST(MA(制造,RN));
VAR27:=CONST(MA(运输,RN));
VAR28:=CONST(MA(上证,RN));
VAR29:=CONST(MA(金属,RN));
医药C:=(CONST(医药)-(VAR17))-(CONST(医药B)-(BVAR17));
金融C:=(CONST(金融)-(VAR18))-(CONST(金融B)-(BVAR18));
纺织C:=(CONST(纺织)-(VAR19))-(CONST(纺织B)-(BVAR19));
建筑C:=(CONST(建筑)-(VAR20))-(CONST(建筑B)-(BVAR20));
机械C:=(CONST(机械)-(VAR21))-(CONST(机械B)-(BVAR21));
地产C:=(CONST(地产)-(VAR22))-(CONST(地产B)-(BVAR22));
农林C:=(CONST(农林)-(VAR23))-(CONST(农林B)-(BVAR23));
电子C:=(CONST(电子)-(VAR24))-(CONST(电子B)-(BVAR24));
石化C:=(CONST(石化)-(VAR25))-(CONST(石化B)-(BVAR25));
制造C:=(CONST(制造)-(VAR26))-(CONST(制造B)-(BVAR26));
运输C:=(CONST(运输)-(VAR27))-(CONST(运输B)-(BVAR27));
上证C:=(CONST(上证)-(VAR28))-(CONST(上证B)-(BVAR28));
金属C:=(CONST(金属)-(VAR29))-(CONST(金属B)-(BVAR29));
P1:=IF(BARSLAST(CURRBARSCOUNT=10),1,0);
P2:=IF(BARSLAST(CURRBARSCOUNT=13),1,0);
P3:=IF(BARSLAST(CURRBARSCOUNT=16),1,0);
P4:=IF(BARSLAST(CURRBARSCOUNT=19),1,0);
P5:=IF(BARSLAST(CURRBARSCOUNT=22),1,0);
P6:=IF(BARSLAST(CURRBARSCOUNT=25),1,0);
P7:=IF(BARSLAST(CURRBARSCOUNT=28),1,0);
P8:=IF(BARSLAST(CURRBARSCOUNT=31),1,0);
P9:=IF(BARSLAST(CURRBARSCOUNT=34),1,0);
P10:=IF(BARSLAST(CURRBARSCOUNT=37),1,0);
P11:=IF(BARSLAST(CURRBARSCOUNT=40),1,0);
P12:=IF(BARSLAST(CURRBARSCOUNT=43),1,0);
P13:=IF(BARSLAST(CURRBARSCOUNT=46),1,0);
P14:=IF(BARSLAST(CURRBARSCOUNT=7),1,0);
STICKLINE(医药,20,IF(P2-P1,CONST(医药C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(金融,20,IF(P3-P2,CONST(金融C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(纺织,20,IF(P4-P3,CONST(纺织C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(建筑,20,IF(P5-P4,CONST(建筑C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(机械,20,IF(P6-P5,CONST(机械C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(地产,20,IF(P7-P6,CONST(地产C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(农林,20,IF(P8-P7,CONST(农林C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(电子,20,IF(P9-P8,CONST(电子C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(石化,20,IF(P10-P9,CONST(石化C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(制造,20,IF(P11-P10,CONST(制造C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(运输,20,IF(P12-P11,CONST(运输C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(金属,20,IF(P13-P12,CONST(金属C)+20,DRAWNULL),8,0),COLOR999999;
STICKLINE(医药,20,IF(P2-P1,CONST(医药)-(VAR17)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(金融,20,IF(P3-P2,CONST(金融)-(VAR18)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(纺织,20,IF(P4-P3,CONST(纺织)-(VAR19)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(建筑,20,IF(P5-P4,CONST(建筑)-(VAR20)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(机械,20,IF(P6-P5,CONST(机械)-(VAR21)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(地产,20,IF(P7-P6,CONST(地产)-(VAR22)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(农林,20,IF(P8-P7,CONST(农林)-(VAR23)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(电子,20,IF(P9-P8,CONST(电子)-(VAR24)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(石化,20,IF(P10-P9,CONST(石化)-(VAR25)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(制造,20,IF(P11-P10,CONST(制造)-(VAR26)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(运输,20,IF(P12-P11,CONST(运输)-(VAR27)+20,DRAWNULL),4,-2),COLORFF00FF;
STICKLINE(上证,20,IF(P1-P14,CONST(上证)-(VAR28)+20,DRAWNULL),4,-1),COLOR0000FF;
STICKLINE(金属,20,IF(P13-P12,CONST(金属)-(VAR29)+20,DRAWNULL),4,-2),COLORFF00FF;
DRAWTEXT(P2-P1,-30,医药),COLORYELLOW;
DRAWTEXT(P3-P2,-30,金融),COLORYELLOW;
DRAWTEXT(P4-P3,-30,纺织),COLORYELLOW;
DRAWTEXT(P5-P4,-30,建筑),COLORYELLOW;
DRAWTEXT(P6-P5,-30,机械),COLORYELLOW;
DRAWTEXT(P7-P6,-30,地产),COLORYELLOW;
DRAWTEXT(P8-P7,-30,农林),COLORYELLOW;
DRAWTEXT(P9-P8,-30,电子),COLORYELLOW;
DRAWTEXT(P10-P9,-30,石化),COLORYELLOW;
DRAWTEXT(P11-P10,-30,制造),COLORYELLOW;
DRAWTEXT(P12-P11,-30,运输),COLORYELLOW;
DRAWTEXT(P13-P12,-30,金属),COLORYELLOW;
VAR1:=EMA(CLOSE,2)-EMA(CLOSE,89);
VAR2:=EMA(VAR1,30);
VAR3:=2*(VAR1-VAR2)*9.8;
VAR4:=POW(VAR3,3)*0.1+POW(VAR3,2);
VAR5:=IF(VAR3 0.015,VAR4,0)/28;
VAR6:=MA(CLOSE,5);
VAR7:=MA(CLOSE,10);
VAR8:=MA(CLOSE,20);
VAR9:=VAR8 VAR7ANDVAR8 VAR6;
XG:VAR9ANDCLOSE VAR8ANDCLOSE/REF(CLOSE,1) 1.092;
公式解读:
公式解读:
公式解读:
公式解读:
每日通达信公式解答:
编写条件:
连续缩量回调后今日放量并收阳线选股公式。
编写方法:
XG:REF(DOWNNDAY(CANDV,10),1)ANDV REF(V,1)ANDC REF(C,1)ANDC