通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、精准二版捉妖指标公式源码
MAA5:MA(C,5),COLORFF00FF,LINETHICK2;
MAA10:=MA(C,10);
MAA30:MA(C,30),COLORRED;
KS:IF(MAA10>MAA30,MAA10,MAA30),COLORBLUE;
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
A4:=SMA(A3,3,1);
A5:=SMA(A4,3,1);
A6:=3*A4-2*A5;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买:=LLV(A8,2)=LLV(A8,7)ANDCOUNT(A8<0,2)ANDCROSS(A8,MA(A8,2));
DRAWTEXT(FILTER(买=1,5),LOW-0.05,’↖买进’),COLORYELLOW;
STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;
MA1:=MA(CLOSE,4);
MA2:=MA(CLOSE,13);
MA3:=MA(CLOSE,24);
MA4:=MA(CLOSE,30);
MA5:=MA(CLOSE,120);
SXSS:=MA2>MA3ANDMA3>MA4ANDMA4>MA5ANDMA2>REF(MA2,1)ANDMA3>REF(MA3,1)ANDMA4>REF(MA4,1)ANDMA5>=REF(MA5,1);
角度13:=ATAN((MA(C,13)/REF(MA(C,13),1)-1)*100)*57.3;
N:=120;
MID1:=MA(C,N);
VART1:=POW((C-MID1),2);
VART2:=MA(VART1,N);
VART3:=SQRT(VART2);
UPPER:=MID1+2*VART3;
LOWER:=MID1-2*VART3;
筹码线:REF(UPPER,1),COLOR00FFFF,LINETHICK2;
趋势线:MA(CLOSE,24),COLORRED,LINETHICK2;
HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;
成本线1:=(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJSJDA,5)+14*REF(HHJSJDA,6)
+13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJDA,12)
+7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJDA,18)+
REF(HHJSJDA,20))/210,COLORYELLOW;
成本线2:=MA(成本线1,7),COLORRED;
AA:=(C-REF(C,1))/REF(C,1)*100;
AAA:=(H-REF(C,1))/REF(C,1)*100;
VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
OBV:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
MAOBV30:=MA(OBV,30);
B:=”OBV.OBV”;
A2:=B>REF(HHV(B,30),1);
红量能:=OBV>MAOBV30;
涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(O,1)),1,0);
创新高1:=HIGH>=HHV(HIGH,20);
Z:=REF(涨停,1);
W:=COUNT(Z,5)>=1;
W3:=COUNT(Z,13)>=1;
DK:=O<=REF(C,1)ANDAA<-2;
W2:=COUNT(DK,2)>=1;
至尊:=WANDAA>2.5ANDREF(W2,1)ANDREF(AA<2.4,1)ANDMA4>0;
STICKLINE(涨停,O,C,2,0),COLORYELLOW;
创新高:=HIGH>=HHV(HIGH,150);
第一次创新高:=创新高=1ANDBARSLAST(REF(创新高=1,1))>=1ANDAA>3;
DRAWTEXT(FILTER(第一次创新高=1,1),LOW-0.2,’↖新高’),COLORYELLOW;
放量:=V>MA(V,89);
异动:=放量=1ANDBARSLAST(REF(放量=1,1))>=6ANDH>BOLLANDMA4>MA5;
STICKLINE(至尊,OPEN,CLOSE,1,0),COLORF00FF0;
牛二:=SXSSANDC>MA2ANDL<=MA2ANDC>OAND角度13>47ANDW3;
DRAWTEXT(FILTER(牛二=1,0),LOW-0.2,’↖牛二’),COLORWHITE;
DRAWICON(至尊,LOW-0.3,1);
DRAWICON(至尊,LOW-1,24);
DRAWICON(至尊,LOW-1.5,25);
DRAWICON(至尊,LOW-2,26);
DRAWTEXT_FIX(1,0.00,0,0,’行业:’),COLORWHITE;
DRAWTEXT_FIX(1,0.04,0,0,HYBLOCK),COLORWHITE;
DRAWTEXT_FIX(1,0.14,0,0,’概念:’),COLORWHITE;
DRAWTEXT_FIX(1,0.18,0,0,GNBLOCK),COLORWHITE;
二、阴线捉妖2指标公式源码
DN1:=SMA(IF(CLOSE>REF(CLOSE,1),CLOSE-REF(CLOSE,1),0),3,1);
DN2:=SMA(IF(CLOSE<=REF(CLOSE,1),ABS(CLOSE-REF(CLOSE,1)),0),3,1);
指标:=100*DN1/(DN1+DN2);
强弱:=EMA(指标,3);
平均:=EMA(强弱,3);
VAR26:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
VAR28:=SMA(VAR26,3,1);
散户:=SMA(VAR28,3,1);
主力:=SMA(散户,3,1);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
上18H:=WMA(SMA(HHV(HIGH,18),9/2,1),3);
下18L:=WMA(SMA(LLV(LOW,18),9/2,1),3);
通道:=(上18H+下18L)/2;
通道角:=ATAN((通道/REF(通道,1)-1)*100)*57.3;
KDFC1:=BARSLAST(CROSS(REF(J,1),J));
操作散:=SMA((HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100,5,1);
操作线:=EMA(SMA(MAX(CLOSE-REF(CLOSE,1),0),5,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),5,1)*100,3);
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,21);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
起爆:(主力>REF(主力,1)OR散户>80)AND通道角>-12ANDREF(操作线,1)>REF(操作散,1)ANDMACD>-0.1ANDREF(J,KDFC1+1)>66AND(CROSS(30,J)ORCROSS(32,强弱))ANDDYNAINFO(8);
N:=5;M:=3;
{DRAWGBKLAST(C>0,’$RGB(60,60,60)$RGB(0,0,0)$0′);
DRAWGBKLAST(((“RSI.RSI2”)>(“RSI.RSI3”))AND((“RSI.RSI3”)>(60.5)),’$RGB(0,0,0)$RGB(100,100,100)$1′);}
VAR0:=((EMA(C,5))*7+(EMA(C,10))*3)/10;
VAR1:=IF((YEAR)>=(2025),0,1);
VAR2:=EMA(EMA(L,21)+(6.8)*(STD(L,2)),55);
VAR3:=EMA(((C/(VAR2))*((1.88)*C+L+O))/(2.75),3);
VAR4:=(((VAR3)-(VAR2))/(VAR2))/2;
VAR5:=(EMA((VAR3)-((VAR4)*(VAR3)),5))*(VAR1);
黄金轨道:(IF((VAR0)>(VAR5),VAR0,VAR5))*(VAR1),LINETHICK2,COLORYELLOW;
上轨:IF(((VAR5)<(VAR0))AND((VAR5)<(C*(0.15))),(EMA(C,300))-(3*(STD(C,300))),VAR5),LINETHICK2,COLORYELLOW;
IF((VAR5)>(VAR0),上轨,DRAWNULL),COLOR00FF00,LINETHICK2;
开口XG:BARSLASTCOUNT(黄金轨道!=上轨)=1,NODRAW;
DRAWICON(开口XG,MIN(上轨,黄金轨道)*0.96,11);
VAR6:=(REF(C,1))*(0.95);
VAR7:=(REF(C,3))*(0.875);
VAR8:=MIN(VAR6,VAR7);
VAR9:=((SMA(MAX(C-(REF(C,1)),0),9,1))/(SMA(ABS(C-(REF(C,1))),9,1)))*(100);
VAR10:=(((SMA(MAX(C-(REF(C,1)),0),24,1))/(SMA(ABS(C-(REF(C,1))),24,1)))*(100))*(VAR1);
IF((((VAR8)=(VAR6))AND((VAR0)>(VAR5)))AND((VAR10)>(64.5)),上轨,DRAWNULL),COLORWHITE,LINETHICK2;
{STICKLINE((VAR6)=(VAR8),C,O,2.5,0),COLORBLUE;
STICKLINE((VAR6)=(VAR8),H,L,0,0),COLORBLUE;}
VAR11:=(EMA(DMA(((2.15)*C+L+H)/4,(ABS((((3.48)*C+H+L)/4)-(EMA(C,20))))/(EMA(C,20))),200))*(0.968+15/(100));
{DRAWTEXT(((CROSS((HHV(H,13))-(((HHV(H,13))-(LLV(L,13)))*(0.382)),VAR5))AND(C>(VAR5)))AND(H>(VAR11)),VAR5,’买入’),LINETHICK2,COLORWHITE;}
VAR12:=MA(C,26)+2*(STD(C,26));
VAR13:=((SMA(MAX(C-(REF(C,1)),0),14,1))/(SMA(ABS(C-(REF(C,1))),14,1)))*(100);
VAR14:=(EMA(C,60)+EMA(C,120)+EMA(C,240)+EMA(C,480))/4;
VAR15:=VAR14+(1.91)*(STD(VAR14,3));
VAR16:=(EMA(VAR15,12))*(1.23);
STICKLINE((((VAR10)>=(64.5))AND((VAR13)>=65))AND((MA(C,1))>(VAR16)),C,O,3,0),COLORRED;
STICKLINE((((VAR10)>=65)AND(C=O))AND((MA(C,1))>(VAR16)),C,O,3,0),COLORRED;
STICKLINE((((VAR10)>65)AND((VAR13)>=65))AND((MA(C,1))>(VAR16)),H,L,0,0),COLORRED;
STICKLINE(((((VAR10)>=(64.5))AND((VAR13)>=65))AND((VAR13)>(VAR10)))AND(C<上轨),O,L,0,0),COLORRED;
STICKLINE(((((VAR10)>=(64.5))AND((VAR13)>=65))AND((VAR13)>(VAR10)))AND(C<上轨),C,H,0,0),COLORRED;
VAR17:=(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;
{VAR17+3*(STD(VAR17,10)),LINETHICK3;}
IF((VAR0)>(VAR5),VAR17+3*(STD(VAR17,10)),DRAWNULL),COLORFF00FF,LINETHICK1;
{VAR18:=(((((((((SMA(MAX(C-(REF(C,1)),0),24,1))/(SMA(ABS(C-(REF(C,1))),24,1)))*(100))>65)AND((VAR0)>(EMA(C,13))))AND((EMA(C,13))>(EMA(C,55))))AND((VAR12)>(REF(VAR12,1))))AND(C>(EMA((H+L+C)/3,13))))AND((MA(C,5))>(MA(C,10))))AND((CROSS(HHV(C,5),(MA(H,10))*(1+5/(100))))AND((((C-(REF(C,1)))/(REF(C,1)))*(100))>(6.5)));
DRAWTEXT((VAR18)>0,L,’涨停追击’),LINETHICK1,COLORYELLOW;}
VAR19:=(EMA((C-(REF(C,1)))/(REF(C,3)),8))*(100);
DRAWTEXT(((((((((C>=((REF(C,1))*(1.095)))AND(C=O))AND(L<C))AND(C>(VAR5)))AND((VAR19)<=6))AND((VAR19)>1))>0)AND((VAR9)>(VAR10)))AND((VAR9)>(64.5)),C,’T字战法’),COLORYELLOW;
VAR20:=((((VAR10)>=(64.5))AND((VAR13)>=65))AND(C>(VAR16)))AND(C>((MA(H,30))*(1+15/(100))));
IF(((((VAR0)>(VAR5))AND((VAR20)>0))AND((VAR17+3*(STD(VAR17,10)))>(REF(VAR17+3*(STD(VAR17,10)),1))))AND((VAR17+3*(STD(VAR17,10)))>(HHV(MA(C,5),60))),VAR17+3*(STD(VAR17,10)),DRAWNULL),COLORFF00FF,LINETHICK3;
{DRAWTEXT((((VAR6)=(VAR8))AND(C>(MA(C,20))))AND((MA(C,5))>(MA(C,20))),L,’反弹’),COLORWHITE;}
VAR22:=EMA(EMA(EMA(EMA(EMA((C-(REF(C,1)))/(REF(C,3)),8),2),2),2),3);
{DRAWTEXT(FILTER(((CROSS(EMA((C-(REF(C,1)))/(REF(C,3)),8),VAR22)))>0,10),L,’抄底‘),COLORYELLOW;}
DRAWTEXT_FIX(1,0,0.9,0,’所属板块:’)COLOR00FFFF;
Z1:=STRCAT(HYBLOCK,”);
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,”);
DRAWTEXT_FIX(ISLASTBAR,0.1,0.9,0,STRCAT(Z3,GNBLOCK)),COLOR00FFFF;
VAR23:=(REF((C-(REF(C,1)))/(REF(C,1)),1))*(100);
STICKLINE(((((C>=((REF(C,1))*(1.095)))AND(C=O))AND(L<C))AND((VAR19)>1))>0,C,O,5,0),COLORWHITE;
STICKLINE(((((C>=((REF(C,1))*(1.095)))AND(C=O))AND(L<C))AND((VAR19)>1))>0,L,C,0,0),COLORWHITE;
STICKLINE(CROSS(VAR9,21),O,C,4,1),COLORWHITE;
VAR24:=COUNT((((C-(REF(C,1)))/(REF(C,1)))*(100))>8,120);
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.145,0,0,VAR24),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0,0,’【股票活跃度】’),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.16,0,0,’级:’),COLORYELLOW;
VAR25:=C*V;
VAR26:=EMA(((EMA(VAR25,3))/(EMA(V,3))+(EMA(VAR25,6))/(EMA(V,6))+(EMA(VAR25,12))/(EMA(V,12))+(EMA(VAR25,24))/(EMA(V,24)))/4,13);
VAR27:=(1.06)*(VAR26);
DRAWTEXT(((((C-(REF(C,1)))/(REF(C,1)))*(100))>(5.5))AND(CROSS((L/((H+REF(C,1)+O)/3))*C,EMA((EMA(C,9))*(1.14),5))),EMA(L-(0.15),1),’▲’),COLORF00FF0;
STICKLINE((((((C-(REF(C,1)))/(REF(C,1)))*(100))>(8.5))AND(CROSS(MA(C,1),(EMA(H,10))*(1+5/(100)))))AND(CROSS(MA(C,1),VAR27)),(L+H+O)/3,O,3,0),COLORRED;
STICKLINE((((((C-(REF(C,1)))/(REF(C,1)))*(100))>(8.5))AND(CROSS(MA(C,1),(EMA(H,10))*(1+5/(100)))))AND(CROSS(MA(C,1),VAR27)),(L+H+O)/3,C,3,0),COLORFF0099;
VAR28:=((C-(LLV(L,9)))/((HHV(H,9))-(LLV(L,9))))*(100);
VAR29:=SMA(VAR28,3,1);
VAR30:=SMA(VAR29,3,1);
VAR31:=(3*(VAR29))-(2*(VAR30));
VAR32:=((H-L)/(REF(C,1)))*(100);
VAR33:=((C-O)/(REF(C,1)))*(100);
VAR34:=((O-L)/(REF(C,1)))*(100);
VAR35:=((H-C)/(REF(C,1)))*(100);
VAR36:=(VAR32)/(1.5);
STICKLINE(((((((VAR32)>7)AND((VAR36)>(4.5)))AND((VAR35)<(5.5)))AND((VAR35)<(VAR34)))AND(BETWEEN(VAR33,-2.5,2.5)))AND((VAR31)<(100)),O,H,0,0),COLORRED;
STICKLINE(((((((VAR32)>7)AND((VAR36)>(4.5)))AND((VAR35)<(5.5)))AND((VAR35)<(VAR34)))AND(BETWEEN(VAR33,-2.5,2.5)))AND((VAR31)<(100)),O,C,3.5,0),COLORRED;
STICKLINE(((((((VAR32)>7)AND((VAR36)>(4.5)))AND((VAR35)<(5.5)))AND((VAR35)<(VAR34)))AND(BETWEEN(VAR33,-2.5,2.5)))AND((VAR31)<(100)),C,L,0,0),COLORF00FF0;
DRAWTEXT(((((VAR32)>2)AND((VAR34)>(VAR33)))AND(H=C))AND(((((((C>=((REF(C,1))*(1.095)))AND(L<C))AND((VAR19)<=6))AND((VAR19)>1))AND((VAR9)>(VAR10)))AND((VAR9)>64))>0),L,’锤法→’),COLORYELLOW;
STICKLINE((((((REF(((C-(REF(C,1)))/(REF(C,1)))*(100),1))<-4)AND((REF(VAR32,1))>5))AND(O>(REF(C,1))))AND((((C-(REF(C,1)))/(REF(C,1)))*(100))>3))AND(O<(REF(O,1))),C,C,5,0),COLORYELLOW;
STICKLINE((((((REF(((C-(REF(C,1)))/(REF(C,1)))*(100),1))<-4)AND((REF(VAR32,1))>5))AND(O>(REF(C,1))))AND((((C-(REF(C,1)))/(REF(C,1)))*(100))>3))AND(O<(REF(O,1))),O,O,5,0),COLORYELLOW;
STICKLINE((((((REF(((C-(REF(C,1)))/(REF(C,1)))*(100),1))<-4)AND((REF(VAR32,1))>5))AND(O>(REF(C,1))))AND((((C-(REF(C,1)))/(REF(C,1)))*(100))>3))AND(O<(REF(O,1))),L,O,0,0),COLORYELLOW;
STICKLINE((((((REF(((C-(REF(C,1)))/(REF(C,1)))*(100),1))<-4)AND((REF(VAR32,1))>5))AND(O>(REF(C,1))))AND((((C-(REF(C,1)))/(REF(C,1)))*(100))>3))AND(O<(REF(O,1))),C,O,3,0),COLORYELLOW;
{DRAWTEXT(CROSS(COST(95),EMA(COST(95),10)),COST(95),’异’),COLORGREEN;}
压线:HHV(MA(C,N),60),COLORGREEN;
大压线:HHV(MA(H,M),120),COLORGREEN;
IF((大压线)>(REF(大压线,1)),大压线,DRAWNULL),COLORYELLOW,LINETHICK1;
IF(C>压线,压线,DRAWNULL),COLOR00FFFF,LINETHICK1;
DRAWTEXT(ISLASTBAR,压线,’←小压力’),COLORGREEN;
DRAWTEXT(ISLASTBAR,大压线,’←大压力’),COLORGREEN;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.145,0.1,0,VAR19),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0.1,0,’【强度关注2级以上】’),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.2,0.1,0,’级:’),COLORYELLOW;
天界:(EMA(H,11))*(1+(5.2)/(100)),NODRAW;
VAR37:=((L+H)/2);
VAR38:=(EMA((O+C+L+H)/4,1));
VAR39:=(EMA((C+L+H)/3,1));
}
STICKLINE(((C>((MA(H,30))*(1+18/(100))))AND(C>(VAR5)))AND((VAR10)>(64.5)),VAR39,VAR37,3,0),COLORWHITE;
{==================波段无敌======================}
波段:EMA(C,5),COLORWHITE,LINETHICK1;
红升1:IF(波段>REF(波段,1),波段,DRAWNULL),COLORFF00FF,LINETHICK2;
绿降1:IF(波段<REF(波段,1),波段,DRAWNULL),COLOR00FF01,LINETHICK1;
[源码注释]通达信公式动态翻译结果
高:=REF(HHV(H,72),5);龙门:REFDATE(高,DATE),COLORWHITE,LINETHICK2;周:MA(CLOSE,5);MA10:MA(CLOSE,10);MA30:MA(CLOSE,30);季:MA(CLOSE,60);半年:MA(CLOSE,120),COLORFFFF00;年:MA(CLOSE,250),COLORRED,LINETHICK2;获利筹码:IF(WINNER(CLOSE),WINNER(CLOSE)*100,0),NODRAW;昨半:REF((C+O)/2,1),COLORYELLOW,NODRAW;半分:(C+O)/2,NODRAW,COLORWHITE;H2:=MAX(H,REF(H,1));L2:=MIN(L,REF(L,1));两日半:(H2+L2)/2,NODRAW;TM:=1200823;涨停:IF(DATE<TM,ZTPRICE(REF(C,1),IF(CODELIKE(‘688’),0.2,IF(NAMEINCLUDE(‘S’),0.05,0.1))),ZTPRICE(REF(C,1),IF(CODELIKE(‘688’) OR CODELIKE(‘300’),0.2,IF(NAMEINCLUDE(‘S’),0.05,0.1)))),NODRAW,COLORRED;跌停:IF(DATE<TM,DTPRICE(REF(C,1),IF(CODELIKE(‘688’),0.2,IF(NAMEINCLUDE(‘S’),0.05,0.1))),DTPRICE(REF(C,1),IF(CODELIKE(‘688’) OR CODELIKE(‘300’),0.2,IF(NAMEINCLUDE(‘S’),0.05,0.1)))),NODRAW,COLORGREEN;明涨停:IF(DATE<TM,C*IF(CODELIKE(‘688’),1.2,IF(NAMEINCLUDE(‘S’),1.05,1.1)),C*(IF(CODELIKE(‘688’) OR CODELIKE(‘300’),1.2,IF(NAMEINCLUDE(‘S’),1.05,1.1)))),NODRAW,COLORLIMAGENTA;明跌停:IF(DATE<TM,C*IF(CODELIKE(‘688’),0.8,IF(NAMEINCLUDE(‘S’),0.45,0.9)),C*(IF(CODELIKE(‘688’) OR CODELIKE(‘300’),0.8,IF(NAMEINCLUDE(‘S’),0.45,0.9)))),NODRAW,COLORFFFF00;ZT:=C>=涨停 AND PERIOD=5 AND H=C;ZT1:=H>=涨停 AND PERIOD=5 AND H>C;DT:=C<=跌停 AND PERIOD=5 AND L=C;DT1:=L<=跌停 AND PERIOD=5 AND L<C;{涨停K线颜色设置}STICKLINE(ZT,C,(O+C)/2,3,0),COLOR000099;STICKLINE(ZT,C,(O+C)/2,2.2,0),COLOR0000CC;STICKLINE(ZT,C,(O+C)/2,1.5,0),COLOR0000FF;STICKLINE(ZT,C,(O+C)/2,0.5,0),COLORCC66FF;STICKLINE(ZT,O,(O+C)/2,3,0),COLOR999999;STICKLINE(ZT,O,(O+C)/2,2.2,0),COLORBBBBBB;STICKLINE(ZT,O,(O+C)/2,1.5,0),COLORDDDDDD;STICKLINE(ZT,O,(O+C)/2,0.5,0),COLORFFFFFF;STICKLINE(DT,O,(O+C)/2,3,0),COLOR999999;STICKLINE(DT,O,(O+C)/2,2.2,0),COLORBBBBBB;STICKLINE(DT,O,(O+C)/2,1.5,0),COLORDDDDDD;STICKLINE(DT,O,(O+C)/2,0.5,0),COLORFFFFFF;STICKLINE(DT,C,(O+C)/2,3,0),COLOR009900;STICKLINE(DT,C,(O+C)/2,2.2,0),COLOR00BB00;STICKLINE(DT,C,(O+C)/2,1.5,0),COLOR00DD00;STICKLINE(DT,C,(O+C)/2,0.5,0),COLOR00FF00;{曾涨跌停打开K线颜色设置}STICKLINE(ZT1,C,(O+C)/2,3,0),COLORFF00FF;STICKLINE(ZT1,C,(O+C)/2,2.2,0),COLORFF00FF;STICKLINE(ZT1,C,(O+C)/2,1.5,0),COLOR0000FF;STICKLINE(ZT1,O,(O+C)/2,3,0),COLOR999999;STICKLINE(ZT1,O,(O+C)/2,2.2,0),COLORBBBBBB;STICKLINE(ZT1,O,(O+C)/2,1.5,0),COLORDDDDDD;STICKLINE(DT1,O,(O+C)/2,3,0),COLOR888888;STICKLINE(DT1,O,(O+C)/2,2.2,0),COLORBBBBBB;STICKLINE(DT1,O,(O+C)/2,1.5,0),COLORDDDDDD;STICKLINE(DT1,C,(O+C)/2,3,0),COLOR009900;STICKLINE(DT1,C,(O+C)/2,2.2,0),COLOR00BB00;STICKLINE(DT1,C,(O+C)/2,1.5,0),COLOR00DD00;STICKLINE(DT1,C,(O+C)/2,0.5,0),COLOR00FF00;DRAWTEXT(ZT AND DT1 AND PERIOD=5,L-0.03,’地天板’),COLORCC00CC;{从跌停到涨停}DRAWTEXT(DT AND ZT1 AND PERIOD=5,H+0.03,’天地板’),COLOR00CC00;{从涨停到跌停};DRAWTEXT(DT1,L-0.09,’撬板’),COLORCC00CC;{从涨停到跌停};DRAWTEXT(ZT1,H+0.03,’炸板’),COLOR00CC00;{从涨停到跌停};假阴:=REF(C>=O,1) AND AMOUNT/V/100>REF(C,1) AND C<O;假阳:=REF(C<=O,1) AND H<REF(O,1) AND C<(REF(O-C,1))/3+REF(C,1) AND AMOUNT/V/100<REF(C,1) AND C>O;STICKLINE(假阴,O,C,0.2,0),COLORRED;{假阴柱};STICKLINE(假阳,O,C,0.7,0),COLORLIGREEN;{假阳};首板:=ZT AND COUNT(ZT,3)=1;二板:=REF(首板,1) AND ZT;三板:=REF(二板,1) AND ZT;四板:=REF(三板,1) AND ZT;五板:=REF(四板,1) AND ZT;六板:=REF(五板,1) AND ZT;七板:=REF(六板,1) AND ZT;八板:=REF(七板,1) AND ZT;九板:=REF(八板,1) AND ZT;十板:=REF(九板,1) AND ZT;DRAWTEXT(首板,L,’1′),COLORWHITE;DRAWTEXT(二板,L,’2′),COLORYELLOW;DRAWTEXT(三板,L,’3′),COLOR00CC99;DRAWTEXT(四板,L,’4′),COLORGREEN;DRAWTEXT(五板,L,’5′),COLORLIGRAY;DRAWTEXT(六板,L,’6′),COLORLIRED;DRAWTEXT(七板,L,’7′),COLORLIBLUE;DRAWTEXT(八板,L,’8′),COLORBLUE;DRAWTEXT(九板,L,’9′),COLORWHITE;DRAWTEXT(十板,L,’10’),COLORYELLOW;DTP:=C>周 AND 周>MA10 AND MA10>MA30 AND 周>季;妖线:=EMA(EMA(C,9)*1.11,5);捉妖:=C>REF(C,1)*1.03 AND CROSS(C,龙门-0.05) AND CROSS(C,妖线) AND DTP;DRAWICON(捉妖,(C+O)/2,23);跟庄看盘:DRAWNULL,COLOR0088FF;现价:REFDATE(C,DATE),DOTLINE,COLORLIGRAY;
推荐阅读:天下第二捉妖指标公式源码
所属地区:DRAWTEXT_FIX(1,0.00,0.05,0,’地区:’),COLORFFFF00;
DRAWTEXT_FIX(1,0.05,0.05,0,DYBLOCK),COLORFFFF00;
所属行业:DRAWTEXT_FIX(1,0,0.10,0,’行业:’),COLORFFFF00;
DRAWTEXT_FIX(1,0.05,0.10,0,HYBLOCK),COLORFFFF00;
所属概念:DRAWTEXT_FIX(1,0,0.15,0,’概念:’),COLORFFFF00;
DRAWTEXT_FIX(1,0.05,0.15,0,GNBLOCK),COLORFFFF00;
所属风格:DRAWTEXT_FIX(1,0,0.20,0,’风格:’),COLORFFFF00;
DRAWTEXT_FIX(1,0.05,0.20,0,FGBLOCK),COLORFFFF00;
上市日期:=CONST(DAYTODATE((DATETODAY(DATE)-FINANCE(42))))+19000000,NODRAW;
DRAWTEXT_FIX(1,0,0.25,0,’上市日期:’),COLORFFFF00;
DRAWNUMBER_FIX(1,0.05,0.25,0,上市日期),COLORFFFF00;
MA5:=MA(C,5);
MA20:=MA(C,20);
A51:=REF(MA5,1)*0.98;
A52:=REF(MA5,2)*0.98;
B52:=BARSLAST(REF(C,2)>=REF(MA5,2)ANDREF(C,1)<REF(MA5,1))+2;
B51:=BARSLAST(REF(C,2)>=REF(MA5,2)ANDREF(C,1)<REF(MA5,1))+1;
DZ:=IF((REF(C,2)>=REF(MA5,2))AND(REF(C,1)<REF(MA5,1)),IF(REF(MA5,2)<REF(MA5,1),A51,A52),IF(BARSSINCE(REF(C,2)>=REF(MA5,2)ANDREF(C,1)<REF(MA5,1))>0,IF(REF(MA5,B52)<REF(MA5,B51),REF(MA5,B51)*0.98,REF(MA5,B52)*0.98),REF(MA5,1)));
A201:=REF(MA20,1)*0.98;
A202:=REF(MA20,2)*0.98;
B202:=BARSLAST(REF(C,2)>=REF(MA20,2)ANDREF(C,1)<REF(MA20,1))+2;
B201:=BARSLAST(REF(C,2)>=REF(MA20,2)ANDREF(C,1)<REF(MA20,1))+1;
ZZ:=IF((REF(C,2)>=REF(MA20,2))AND(REF(C,1)<REF(MA20,1)),IF(REF(MA20,2)<REF(MA20,1),A201,A202),IF(BARSSINCE(REF(C,2)>=REF(MA20,2)ANDREF(C,1)<REF(MA20,1))>0,IF(REF(MA20,B202)<REF(MA20,B201),REF(MA20,B201)*0.98,REF(MA20,B202)*0.98),REF(MA20,1)));
短止:DZ,COLORWHITE,LINETHICK2;
紫线:ZZ,COLORMAGENTA;
绿线:LLV(REF(LOW,1),2)+(HHV(REF(HIGH,1),2)-LLV(REF(LOW,1),2))/2,COLORGREEN;
黄线:MA(CLOSE,25)+MA(CLOSE,25)*6/100,COLORYELLOW,LINETHICK2;
白轨:MA(CLOSE,25)+MA(CLOSE,25)*20/100,COLORWHITE;
影子线:MA(CLOSE,25)+MA(CLOSE,25)*13/100,COLORGRAY;
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;
AZZ:=LLV(REF(LOW,1),2)+(HHV(REF(HIGH,1),2)-LLV(REF(LOW,1),2))/2,COLORGREEN;
DRAWICON(REF(C,1)<REF(DZ,1)ANDC>=DZANDC>AZZ,LOW*0.99,1);
DRAWICON(REF(C,1)<REF(AZZ,1)ANDC>=AZZ,LOW*0.99,1);
AXX:=((((MA(C,10)>MA(C,25))&&CROSS(C,MA(C,5)))&&(V>MA(V,10)))&&(MA(C,10)>REF(MA(C,10),1)));
ASS:=C>=黄线ANDAXX;
DRAWTEXT(ASS,L*0.99,’☆’),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0,0.00,0,’说明:☆为稳买’),COLORLIGREEN;
{涨跌停显示}
涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(O,1)),1,0);
STICKLINE(涨停,O,C,1,0),COLORYELLOW;
XA:=(ATAN((MA(C,3)/REF(MA(C,3),1)-1)*100)*180/3.14115926)>60;
XB:=C/REF(C,2)>1.08ANDC=HHV(C,40);
妖股:XAANDXBANDBARSCOUNT(C)>19,NODRAW,COLORYELLOW;
DRAWICON(妖股,L,13);
DRAWTEXT(妖股,L*0.92,’妖股’),COLORYELLOW;
XC:=C=ZTPRICE(REF(C,1),0.1);
STICKLINE(XC,C,O,0.5,0)COLORYELLOW;
STICKLINE(XC,H,L,0.5,0),COLORYELLOW;
倍量:=V>REF(MA(V,5),1)*1.8ANDC>REF(C,1)ANDBARSCOUNT(C)>15;
DRAWTEXT(倍量,L*0.97,’倍’),COLORMAGENTA,LINETHICK2;
DRAWTEXT(CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),
HIGH*1.02,’●警’),COLORGREEN;
{买入}
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
A4:=SMA(A3,3,1);
A5:=SMA(A4,3,1);
A6:=3*A4-2*A5;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买:=LLV(A8,2)=LLV(A8,7)ANDCOUNT(A8<0,2)ANDCROSS(A8,MA(A8,2));
DRAWTEXT(FILTER(买=1,5),LOW-0.05,’买进’),COLORYELLOW;
STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORMAGENTA;
N:=12;
DG:=1.2;
YLX:=0;
ZCX:=0;
A1:=REF(C,N)=HHV(C,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);HD:=FILTER(C1,N);
A2:=REF(C,N)=LLV(C,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);LD:=FILTER(C2,N);
UU:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1);VV:=UU>REF(UU,1);
前高:REF(C,BARSLAST(VV)),COLORRED,LINETHICK2;
顶高:=REF(C,BARSLAST(VV))*DG,COLORGRAY,LINETHICK2;
PTZQ:=BARSLAST(VV);
PTZF:=(HHV(H,PTZQ)-LLV(L,PTZQ))/LLV(L,PTZQ)*100;
DRAWTEXT_FIX(1,0.5,0.04,0,STRCAT(STRCAT(‘平台周期’,CON2STR(PTZQ,0)),’天’)),COLORRED;
DRAWTEXT_FIX(1,0.5,0.08,0,STRCAT(STRCAT(‘平台振幅’,CON2STR(PTZF,0)),’%’)),COLORYELLOW;
N8:=22;
P1:=2.8;
P2:=3.2;
P3:=3.5;
VAR1:=EMA(EMA(CLOSE,13),13);
VAR2:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
VAR3:=DYNAINFO(11);
VAR4:=(EMA(CLOSE,8)-EMA(CLOSE,55))*10;
VAR5:=EMA(VAR4,3);
VAR6:=(C-VAR3)/VAR3<-0.03;
VAR7:=VAR2>REF(VAR2,1)ANDVAR2<-0.2;
VAR8:=CROSS(VAR4,VAR5)ANDVAR4<-0.3;
XG:FILTER(VAR6ANDVAR7ANDVAR8,13),COLORRED,LINETHICK2;
VAR11:=EMA(HHV(HIGH,500),21);
VAR2:=EMA(HHV(HIGH,250),21);
VAR3:=EMA(HHV(HIGH,90),21);
VAR4:=EMA(LLV(LOW,500),21);
VAR5:=EMA(LLV(LOW,250),21);
VAR6:=EMA(LLV(LOW,90),21);
VAR7:=EMA((VAR4*0.96+VAR5*0.96+VAR6*0.96+VAR11*0.558+VAR2*0.558+VAR3*0.558)/6,21);
VAR8:=EMA((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR11*0.55+VAR2*0.55+VAR3*0.65)/6,21);
VAR9:=EMA((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR11*0.68+VAR2*0.68+VAR3*0.68)/6,21);
VARA:=EMA((VAR7*3+VAR8*2+VAR9)/6*1.738,21);
VARB:=REF(LOW,1);
VARC:=SMA(ABS(LOW-VARB),3,1)/SMA(MAX(LOW-VARB,0),3,1)*100;
VARD:=EMA(IF(CLOSE*1.35<=VARA,VARC*10,VARC/10),3);
VARE:=LLV(LOW,30);
VARF:=HHV(VARD,30);
VAR10:=IF(MA(CLOSE,58),1,0);
AA3:=(EMA(IF(LOW<=VARE,(VARD+VARF*2)/2,0),3)/618*VAR10);
BB:=AA3>REF(HHV(AA3,60),1);
CC:=HHV(AA3,60);
大底:=FILTER(AA3>10,1);
预警:STICKLINE(大底>0ANDC<O,30,10,1,0),COLORYELLOW;
{VA1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买1:=IF(CLOSE>OPEN,VA1*(HIGH-LOW),IF(CLOSE<OPEN,VA1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主卖1:=IF(CLOSE>OPEN,0-VA1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VA1*(HIGH-LOW),0-VOL/2));
AA6:=(主买1-(-主卖1))/主买1;};
{第二段拉升}
ZKK:=”KD.K#WEEK”(9,3,3),COLORRED;
ZKD:=”KD.D#WEEK”(9,3,3),COLORYELLOW;
KCD:=FILTER(CROSS(ZKK,ZKD)ANDREF(ZKD,1)<30,13);
XG1:=KCD;
STICKLINE(XG1,80,10,1,0),COLOR000099;
{第三段旭日东升}
VAR12:=(CLOSE-MA(CLOSE,50))/MA(CLOSE,50)*100<-23;
VAR13:=SMA(MAX(CLOSE-REF(CLOSE,1),0),3,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),3,1)*100>16;
VAR14:=100*(HHV(HIGH,27)-CLOSE)/(HHV(HIGH,27)-LLV(LOW,27));
XG2:=VAR12ANDVAR13ANDCROSS(VAR14,79)AND(OPEN>CLOSEOROPEN<CLOSE)AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1)<0.05ANDVOL>MA(VOL,23);
旭日东升:STICKLINE(XG2,50,10,1,0),COLORFFFFFF;
评论(0)