通达信指标公式源码概况:

指标类别: 通达信指标公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、一线捉妖股指标公式

  

s:=EMA((CLOSE-LLV(CLOSE,21))/(HHV(CLOSE,21)-LLV(CLOSE,21)),1);  

一线胜庄:if(s>0,ma(s,1),0),COLORred;  

drawicon(cross(一线胜庄,0.001),一线胜庄,1);  

VR1:=VOL/CAPITAL;  

VR2:=VOL/700000000;  

VR3:=IF(VR1=0,VR2,VR1);  

VR4:=1.1*(MAX(HIGH,REF(CLOSE,1))/MIN(LOW,REF(CLOSE,1))-1);  

VR5:=2.5*MAX(VR3,VR4);  

VR6:=DMA(CLOSE,VR5);  

VR7:=SMA(20*(VR6/REF(VR6,1)-1),2,1);  

VR8:=EMA(VR7,2);  

VRA:=0.24;  

VRB:=CLOSE>=REF(CLOSE,1);  

牛:=IF(VR7>VRAANDVR8>=0.005ANDVRB,1,0);  

疯牛:=CROSS(牛,0.5)ANDCOUNT(牛>0.5,10)=1;  

QB:="KDJ.J"-REF("KDJ.J",1)>30ANDC/REF(C,1)>1.043AND"MACD.MACD">0AND"MACD.DEA">0;  

LS:=C/REF(C,1)>1.048ANDC=HANDBETWEEN(FORCAST(V,4),0.2*FORCAST(V,12),2.1*FORCAST(V,12));  

LQ:=FILTER(LS,28)*100ANDL>REF(C,1)*0.93;  

XG1:=QBORLQAND疯牛;  

涨幅:=9;高度:=20;跨度:=10;N4:=34;  

短线:=EMA(CLOSE,17);  

A:=(3*C+L+O+H)/6;  

X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+  

14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)  

+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+  

REF(A,20))/210;  

中线:=EMA(X,13);  

KKA:=EMA(C,5);  

KKB:=EMA(KKA,8);  

KKC:=EMA(KKB,13);  

长线:=EMA(KKC,50);  

中期:=100*(C-LLV(L,N4))/(HHV(C,N4)-LLV(L,N4));  

KDD:=REF(中期,1)<1and中期>1;  

持股:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA  

((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);  

支撑:=LLV(持股,3);  

中期线:=MA(持股,12);  

VAR1:=1;  

VAR2:=LLV(LOW,10);  

VAR3:=HHV(HIGH,25);  

短期线:=EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*VAR1*30;  

AAA:=(3*C+L+O+H)/6;  

C2:=EMA(AAA,6);  

C3:=EMA(AAA,5);  

SHORT:=12;  

LONG:=26;  

MID:=9;  

DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);  

DEA:=EMA(DIF,MID);  

MACD:=(DIF-DEA)*2;  

N:=9;  

M1:=3;  

M2:=3;  

RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;  

K:=SMA(RSV,M1,1);  

D:=SMA(K,M2,1);  

J:=3*K-2*D;  

KAAA1:=EXIST(KDD,3);  

KBBB1:=C/REF(C,1)>1+0.01*涨幅;  

KAAA2:=支撑>中期线AND持股=支撑;  

KBBB2:=CROSS(C2,C3);  

KCCC2:=EXIST(C/REF(C,1)>1+0.01*涨幅,跨度);  

KDDD2:=BARSLAST(中期线>短期线)<跨度;  

KAAA3:=REF(C,1)中线;  

KBBB3:=C/REF(C,1)>1+0.01*涨幅;  

KCCC3:=中线/长线<1+0.01*高度;  

超资:=IF(KBBB1+KCCC2+KBBB3=3,1,0);  

CC:=(H-C)/(C-O)<0.33;  

DD:=(C/REF(C,1)-1)>=0.0502ANDC>REF(C,1)AND(O-L)/(C-O)>=1.48ANDL<REF(L,1)ANDL<REF(L,2);  

EE:=(C/REF(C,1)-1)>=0.08;  

AA:=VOL>REF(VOL,1)*1.9ANDC>REF(C,1)ANDC/REF(C,1)-1>=0.049ANDCC;  

BB:=(C/REF(C,1)-1)>=0.0502ANDC>REF(C,1)ANDV>REF(V,1)ANDVOL>REF(VOL,1)*2.5ANDCC;  

异动选股:=IF(FILTER(AAORBBORDDOREE,34),1,0)AND超资;  

XG:XG1OR异动选股;  

月DIF:="MACD.DIF#MONTH";  

月DEA:="MACD.DEA#MONTH",;  

周DIF:="MACD.DIF#WEEK";  

周DEA:="MACD.DEA#WEEK",;  

日DIF:="MACD.DIF";  

日DEA:="MACD.DEA";  

金叉:=CROSS(日DIF,日DEA);  

周金叉:=CROSS(周DIF,周DEA);  

月金叉:=CROSS(月DIF,月DEA);  

妖股初现:CROSS(周DIF,周DEA)ANDC/REF(C,1)>1.05;

image.png

二、一线捉妖选股指标公式

  

JJ:=(CLOSE+HIGH+LOW)/3;  

A:=EMA(JJ,10);  

B:=REF(A,1);  

持股区域:STICKLINE(A>B,A,B,2,0),ColorFF80FF,linethick3;  

持币区域:STICKLINE(A<B,A,B,2,0),ColorFFFF00,linethick3;  

TA:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));  

ATR:=EMA(TA,13);  

VAR8:=REF(CLOSE,1)-REF(ATR,1);  

多空线:HHV(VAR8,13),COLORWHITE,linethick2;  

DRAWTEXT(ISLASTBAR,多空线,'多空线'),COLORWHITE;  

MA60:MA(CLOSE,60),,Color008080,linethick2;  

STICKLINE(CLOSE>=OPEN,HIGH,LOW,0.1,1),COLORRED;  

STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,7,1),COLORRED;  

STICKLINE(CLOSE<OPEN,HIGH,LOW,0.1,0),Color00FF80;  

STICKLINE(CLOSE<OPEN,CLOSE,OPEN,7,0),Color00FF80;  

人线1:=MA(L,24)COLORYELLOW;  

天线:=人线1+2.65*STD(CLOSE,21)COLORBLUELINETHICK3;  

地线:=人线1-2.3*STD(CLOSE,21)COLORGREEN{11}LINETHICK3;  

DRAWKLINE(H,O,L,C);  

人线:=MA(C,20)COLORYELLOW,LINETHICK1;  

凤线:=MA(C,40)COLORMAGENTA{1},LINETHICK1;  

龙线:=MA(C,60)COLORCYAN,LINETHICK1;  

DRAWKLINE(H,O,L,C);{重绘K线}  

RC1:=REF(C,1);  

CS:=IF(C>=1,10000,100000);  

C涨停10:=1.10*RC1-49/CS;{考虑到4舍5入}  

C涨停5:=1.05*RC1-49/CS;  

C跌停10:=0.90*RC1+51/CS;  

C跌停5:=0.95*RC1+51/CS;  

ST:=NAMELIKE('S')ORNAMELIKE('*S');  

涨停:=IF(ST,C>=C涨停5,C>=C涨停10);  

跌停:=IF(ST,C<=C跌停5,C<=C跌停10);  

盘中涨停:=IF(ST,H>=C涨停5,H>=C涨停10);  

盘中跌停:=IF(ST,L<=C跌停5,L<=C跌停10);  

STICKLINE(盘中涨停,H,MAX(C,O),0,0),COLORMAGENTA;{涨停后回落}  

STICKLINE(盘中跌停,L,MIN(C,O),0,0),COLORBLUE;{跌停后回升}  

STICKLINE(涨停,O,C,3,0),COLORYELLOW;  

STICKLINE(跌停,O,C,3,0),COLORBLUE;  

RSV:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;  

K:=SMA(RSV,3,1),LINETHICK2,COLORGREEN;  

D:=SMA(K,3,1),LINETHICK2;  

MA1:=MA(CLOSE,3)NODRAW;  

MA2:=MA(CLOSE,21)NODRAW;  

VOLUME:=VOL,VOLSTICKNODRAW;  

连续下跌:=(HHV(H,10)-L)/L*100>=15;  

昨日阴线:=REF(O,1)<=ref(ref(min(c,o),1),1)and(ref(h,1)-ref(l,1))>=0.04ANDREF(C,1)<REF(O,1)NODRAW;  

箭在弦上:=MAX(C,O)<=ref(c,1)and(h-max(c,o))>=(MAX(C,O)-MIN(C,O))*3AND(H-MAX(C,O))>=(MIN(C,O)-L)*5AND(H-L)/L>=0.05NODRAW;  

DRAWTEXT(昨日阴线AND箭在弦上AND连续下跌ANDK<=30,L*0.98,'箭')COLORYELLOW;  

DRAWTEXT(昨日阴线AND箭在弦上AND连续下跌ANDK<=30,L*0.95,'在')COLORYELLOW;  

DRAWTEXT(昨日阴线AND箭在弦上AND连续下跌ANDK<=30,L*0.92,'弦')COLORYELLOW;  

DRAWTEXT(昨日阴线AND箭在弦上AND连续下跌ANDK<=30,L*0.89,'上')COLORYELLOW;  

箭在弦上1:=MAX(C,O)<=ref(c,1)and(h-max(c,o))>=(MAX(C,O)-MIN(C,O))*3AND(H-MAX(C,O))>=(MIN(C,O)-L)*5AND(H-L)/L>=0.05AND(MAX(C,O))<=REF(MIN(C,O),1)NODRAW;  

DRAWTEXT(昨日阴线AND箭在弦上1AND连续下跌ANDK<=30,L*0.98,'箭')COLORYELLOW;  

DRAWTEXT(昨日阴线AND箭在弦上1AND连续下跌ANDK<=30,L*0.95,'在')COLORYELLOW;  

DRAWTEXT(昨日阴线AND箭在弦上1AND连续下跌ANDK<=30,L*0.92,'弦')COLORYELLOW;  

DRAWTEXT(昨日阴线AND箭在弦上1AND连续下跌ANDK<=30,L*0.89,'上')COLORYELLOW;  

火箭升空:=(H-L)/L>=0.07AND(MIN(C,O)-L)>=(H-MAX(C,O))*5ANdmiN(C,O)-L>=(ABS(C-O))*3NODRAW;  

DRAWTEXT(昨日阴线AND火箭升空AND连续下跌ANDK<=30,L*0.98,'火')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空AND连续下跌ANDK<=30,L*0.95,'箭')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空AND连续下跌ANDK<=30,L*0.92,'升')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空AND连续下跌ANDK<=30,L*0.89,'空')COLORYELLOW;  

火箭升空1:=(H-L)/L>=0.07AND(MIN(C,O)-L)>=(H-MAX(C,O))*5AND(MAX(C,O))<=ref(min(c,o),1)andmin(c,o)-l>=(ABS(C-O))*3NODRAW;  

DRAWTEXT(昨日阴线AND火箭升空1AND连续下跌ANDK<=30,L*0.98,'火')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空1AND连续下跌ANDK<=30,L*0.95,'箭')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空1AND连续下跌ANDK<=30,L*0.92,'升')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空1AND连续下跌ANDK<=30,L*0.89,'空')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空1AND连续下跌ANDC<REF(L,1)ANDK<=30,L*0.98,'火')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空1AND连续下跌ANDC<REF(L,1)ANDK<=30,L*0.95,'箭')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空1AND连续下跌ANDC<REF(L,1)ANDK<=30,L*0.92,'升')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空1AND连续下跌ANDC<REF(L,1)ANDK<=30,L*0.89,'空')COLORYELLOW;  

过滤ST1:=IF(NAMELIKE('*ST'),0,1)ANDIF(NAMELIKE('S'),0,1);  

落叶归根:=(H-L)/L>=0.07AND(MIN(C,O)-L)>=(H-MAX(C,O))*5ANDMIN(C,O)-L>=(ABS(C-O))*3ANDC=ONODRAW;  

DRAWTEXT(昨日阴线AND落叶归根AND连续下跌ANDK<=30AND过滤ST1,L*0.98,'落')COLORYELLOW;  

DRAWTEXT(昨日阴线AND落叶归根AND连续下跌ANDK<=30AND过滤ST1,L*0.95,'叶')COLORYELLOW;  

DRAWTEXT(昨日阴线AND落叶归根AND连续下跌ANDK<=30AND过滤ST1,L*0.92,'归')COLORYELLOW;  

DRAWTEXT(昨日阴线AND落叶归根AND连续下跌ANDK<=30AND过滤ST1,L*0.89,'根')COLORYELLOW;  

火箭升空2:=(H-L)/L>=0.07AND(MIN(C,O)-L)>=(H-MAX(C,O))*5AND(MAX(C,O))<=ref(min(c,o),1)andmin(c,o)-l>=(ABS(C-O))*3ANDC=ONODRAW;  

DRAWTEXT(昨日阴线AND火箭升空2AND连续下跌ANDK<=30AND过滤ST1,L*0.98,'落')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空2AND连续下跌ANDK<=30AND过滤ST1,L*0.95,'叶')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空2AND连续下跌ANDK<=30AND过滤ST1,L*0.92,'归')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空2AND连续下跌ANDK<=30AND过滤ST1,L*0.89,'根')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空2AND连续下跌ANDC<REF(L,1)ANDK<=30AND过滤ST1,L*0.98,'落')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空2AND连续下跌ANDC<REF(L,1)ANDK<=30AND过滤ST1,L*0.95,'叶')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空2AND连续下跌ANDC<REF(L,1)ANDK<=30AND过滤ST1,L*0.92,'归')COLORYELLOW;  

DRAWTEXT(昨日阴线AND火箭升空2AND连续下跌ANDC<REF(L,1)ANDK<=30AND过滤ST1,L*0.89,'根')COLORYELLOW;  

看涨吞没:=OREF(C,1)ANDC>REF(O,1)ANDV>REF(V,1)NODRAW;  

DRAWTEXT(昨日阴线AND(REF(C,1)-C)/REF(C,1)>=0.05AND看涨吞没AND连续下跌ANDK<=30,L*0.98,'看')COLORYELLOW;  

DRAWTEXT(昨日阴线AND(REF(C,1)-C)/REF(C,1)>=0.05AND看涨吞没AND连续下跌ANDK<=30,L*0.95,'涨')COLORYELLOW;  

DRAWTEXT(昨日阴线AND(REF(C,1)-C)/REF(C,1)>=0.05AND看涨吞没AND连续下跌ANDK<=30,L*0.92,'吞')COLORYELLOW;  

DRAWTEXT(昨日阴线AND(REF(C,1)-C)/REF(C,1)>=0.05AND看涨吞没AND连续下跌ANDK<=30,L*0.89,'没')COLORYELLOW;  

昨日跌幅:=(REF(REF(C,1),1)-REF(C,1))/REF(REF(C,1),1)>=0.05NODRAW;  

曙光初现:=OOANDREF(O+(C-O)*0.5,1)<=CNODRAW;  

昨天阴线实体:=REF(O>C,1)AND(REF(O,1)-REF(C,1))/2<CNODRAW;  

实体振幅:=(C-O)/O>=0.05NODRAW;  

DRAWTEXT(昨日跌幅AND曙光初现AND连续下跌AND昨天阴线实体AND实体振幅ANDC>REF(C,1)ANDK<=40,L*0.98,'曙')COLORYELLOW;  

DRAWTEXT(昨日跌幅AND曙光初现AND连续下跌AND昨天阴线实体AND实体振幅ANDC>REF(C,1)ANDK<=40,L*0.95,'光')COLORRED;  

DRAWTEXT(昨日跌幅AND曙光初现AND连续下跌AND昨天阴线实体AND实体振幅ANDC>REF(C,1)ANDK<=40,L*0.92,'出')COLORYELLOW;  

DRAWTEXT(昨日跌幅AND曙光初现AND连续下跌AND昨天阴线实体AND实体振幅ANDC>REF(C,1)ANDK<=40,L*0.89,'现')COLORYELLOW;  

ZDF:=(C-REF(C,1))/REF(C,1)*100;  

旭日东升:=REF(ZDF,1)<-3andzdf>=6ANDC>REF(O,1)ANDK<40NODRAW;  

DRAWTEXT(旭日东升,L*0.98,'旭')COLORGREEN;  

DRAWTEXT(旭日东升,L*0.95,'日')COLORRED;  

DRAWTEXT(旭日东升,L*0.92,'东')COLORGREEN;  

DRAWTEXT(旭日东升,L*0.89,'升')COLORGREEN;  

DRAWTEXT(C>REF(HHV(C,60),1)ANDREF(C,1)/REF(REF(C,1),1)>1.098ANDC/REF(C,1)>1.098ANDNOT(C>=REF(C,1)*1.097ANDC=OANDH=L),L*0.98,'捉')COLORMAGENTA;  

DRAWTEXT(C>REF(HHV(C,60),1)ANDREF(C,1)/REF(REF(C,1),1)>1.098ANDC/REF(C,1)>1.098ANDNOT(C>=REF(C,1)*1.097ANDC=OANDH=L),L*0.95,'妖')COLORYELLOW;  

{空中加油}  

ZT:=C/REF(C,1)>=1.0989ANDC=HNODRAW;  

TJ:=EVERY(ZT,1)NODRAW;  

ZF:=(HHV(H,5)-LLV(L,5))/LLV(L,5)*100<=20NODRAW;  

XG1:=ZTAND(REF(TJ,6))ANDZFNODRAW;  

DRAWTEXT(XG1,L*0.98,'空中加油')COLORYELLOW;  

LC:=REF(CLOSE,1);  

RSI1:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100,COLORRED,LINETHICK2;  

RSI1C:=IF(CROSS(RSI1,3)ORCROSS(RSI1,6)ORCROSS(RSI1,15)ORCROSS(RSI1,20)ORCROSS(RSI1,25)ORCROSS(RSI1,28)ORCROSS(RSI1,32)ORCROSS(RSI1,35)ORCROSS(RSI1,40)ORCROSS(RSI1,45)ORCROSS(RSI1,50)ORCROSS(RSI1,55)ORCROSS(RSI1,60)ORCROSS(RSI1,65),85,0);  

RSI1Z:=IF(REF(RSI1,0)-REF(RSI1,1)>5ANDRSI1>20,65,0);  

WR1:=100*(HHV(HIGH,10)-CLOSE)/(HHV(HIGH,10)-LLV(LOW,10));  

WR2:=100*(HHV(HIGH,6)-CLOSE)/(HHV(HIGH,6)-LLV(LOW,6))COLORGREEN;  

XG:RSI1>95.5ANDRSI1Z=65ANDWR2=0;

image.png

[源码注释]通达信公式动态翻译结果

VR1赋值:成交量(手)/当前流通股本(手)

VR2赋值:成交量(手)/700000000

VR3赋值:如果VR1=0,返回VR2,否则返回VR1

VR4赋值:1.1*(最高价和1日前的收盘价的较大值/最低价和1日前的收盘价的较小值-1)

VR5赋值:2.5*VR3和VR4的较大值

VR6赋值:以VR5为权重收盘价的动态移动平均

VR7赋值:20*(VR6/1日前的VR6-1)的2日[1日权重]移动平均

VR8赋值:VR7的2日指数移动平均

VRA赋值:0.24

VRB赋值:收盘价>=1日前的收盘价

牛赋值: 如果VR7>VRAANDVR8>=0.005ANDVRB,返回1,否则返回0

疯牛赋值:牛上穿0.5 AND 统计10日中满足牛>0.5的天数=1

QB赋值:"KDJ的J"-1日前的"KDJ的J">30 AND 收盘价/1日前的收盘价>1.043 AND "平滑异同平均的MACD">0 AND "平滑异同平均的DEA">0

LS赋值:收盘价/1日前的收盘价>1.048 AND 收盘价=最高价 AND 成交量(手)的4日线性回归预测值位于0.2*成交量(手)的12日线性回归预测值和2.1*成交量(手)的12日线性回归预测值之间

LQ赋值:LS的28日过滤*100 AND 最低价>1日前的收盘价*0.93 

XG1赋值:QB OR LQ AND 疯牛

涨幅赋值:9

高度赋值:20

跨度赋值:10

N4赋值:34

短线赋值:收盘价的17日指数移动平均

A赋值:(3*收盘价+最低价+开盘价+最高价)/6

X赋值:(20*A+19*1日前的A+18*2日前的A+17*3日前的A+16*4日前的A+15*5日前的A+14*6日前的A+13*7日前的A+12*8日前的A+11*9日前的A+10*10日前的A+9*11日前的A+8*12日前的A+7*13日前的A+6*14日前的A+5*15日前的A+4*16日前的A+3*17日前的A+2*18日前的A+20日前的A)/210

中线赋值:X的13日指数移动平均

KKA赋值:收盘价的5日指数移动平均

KKB赋值:KKA的8日指数移动平均

KKC赋值:KKB的13日指数移动平均

长线赋值:KKC的50日指数移动平均

中期赋值:100*(收盘价-N4日内最低价的最低值)/(N4日内收盘价的最高值-N4日内最低价的最低值)

KDD赋值:1日前的中期<1 and="">1

持股赋值:3*(收盘价-27日内最低价的最低值)/(27日内最高价的最高值-27日内最低价的最低值)*100的5日[1日权重]移动平均-2*(收盘价-27日内最低价的最低值)/(27日内最高价的最高值-27日内最低价的最低值)*100的5日[1日权重]移动平均的3日[1日权重]移动平均

支撑赋值:3日内持股的最低值

中期线赋值:持股的12日简单移动平均

VAR1赋值:1

VAR2赋值:10日内最低价的最低值

VAR3赋值:25日内最高价的最高值

短期线赋值:(收盘价-VAR2)/(VAR3-VAR2)*4的4日指数移动平均*VAR1*30

AAA赋值:(3*收盘价+最低价+开盘价+最高价)/6

C2赋值:AAA的6日指数移动平均

C3赋值:AAA的5日指数移动平均

SHORT赋值:12

LONG赋值:26

MID赋值:9

DIF赋值:收盘价的SHORT日指数移动平均-收盘价的LONG日指数移动平均

DEA赋值:DIF的MID日指数移动平均

MACD赋值:(DIF-DEA)*2

N赋值:9

M1赋值:3

M2赋值:3

RSV赋值:(收盘价-N日内最低价的最低值)/(N日内最高价的最高值-N日内最低价的最低值)*100

K赋值:RSV的M1日[1日权重]移动平均

D赋值:K的M2日[1日权重]移动平均

J赋值:3*K-2*D

KAAA1赋值:最近3日存在KDD

KBBB1赋值:收盘价/1日前的收盘价>1+0.01*涨幅

KAAA2赋值:支撑>中期线 AND 持股=支撑

KBBB2赋值:C2上穿C3

KCCC2赋值:最近跨度日存在收盘价/1日前的收盘价>1+0.01*涨幅

KDDD2赋值:上次中期线>短期线距今天数<跨度

KAAA3赋值:1日前的收盘价<1日前的中线 and="">中线

KBBB3赋值:收盘价/1日前的收盘价>1+0.01*涨幅

KCCC3赋值:中线/长线<1+0.01*高度

超资赋值:如果KBBB1+KCCC2+KBBB3=3,返回1,否则返回0

CC赋值:(最高价-收盘价)/(收盘价-开盘价)<0.33

DD赋值:(收盘价/1日前的收盘价-1)>=0.0502 AND 收盘价>1日前的收盘价 AND (开盘价-最低价)/(收盘价-开盘价)>=1.48 AND 最低价<1日前的最低价 AND 最低价<2日前的最低价

EE赋值:(收盘价/1日前的收盘价-1)>=0.08

AA赋值:成交量(手)>1日前的成交量(手)*1.9 AND 收盘价>1日前的收盘价 AND 收盘价/1日前的收盘价-1>=0.049 AND CC

BB赋值:(收盘价/1日前的收盘价-1)>=0.0502 AND 收盘价>1日前的收盘价 AND 成交量(手)>1日前的成交量(手) AND 成交量(手)>1日前的成交量(手)*2.5 AND CC

异动选股赋值:如果AAORBBORDDOREE的34日过滤,返回1,否则返回0 AND 超资

输出XG: XG1 OR 异动选股

推荐阅读:一线捉妖股主图指标公式

  

底:30COLORREDLINETHICK3;  

神:70COLORGREENLINETHICK3;  

针:50COLORYELLOWLINETHICK3;  

LC:=REF(CLOSE,1);  

抄:SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100LINETHICK2,COLOR4080FF;  

AA:=VOL/CAPITAL>=0.28;  

BB:=VOL/MA(V,60)>=2.8;  

CC:=H>COST(88)ANDC>O;  

妖股:FILTER(AAANDBBANDCC,40);  

MA10:=MA(CLOSE,10);  

MA54:=MA(CLOSE,54);  

HJ_8:=(REF(CLOSE,3)-CLOSE)/REF(CLOSE,3)*100>5;  

HJ_9:=FILTER(HJ_8,10);  

HJ_10:=BARSLAST(HJ_9);  

HJ_11:=REF(HIGH,HJ_10+2);  

HJ_12:=REF(HIGH,HJ_10+1);  

HJ_13:=REF(HIGH,HJ_10);  

HJ_14:=MAX(HJ_11,HJ_12);  

HJ_15:=MAX(HJ_14,HJ_13);  

HJ_16:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>5;  

HJ_17:=HJ_10<150;  

HJ_18:=(OPEN-HJ_15)/HJ_15*100<30;  

HJ_19:=(CLOSE-LLV(LOW,HJ_10))/LLV(LOW,HJ_10)*100<50;  

HJ_20:=(CLOSE-REF(OPEN,5))/REF(OPEN,5)*100<30;  

HJ_21:=VOL/MA(VOL,5)<3.5;  

HJ_22:=(CLOSE-REF(CLOSE,89))/REF(CLOSE,89)*100<80;  

HJ_25:=HJ_16ANDHJ_17ANDHJ_18ANDHJ_19ANDHJ_20ANDHJ_21ANDHJ_22;  

暴利:=FILTER(HJ_25,15);  

PL1:=(((CLOSE-MA54)/MA54)<0.1);  

PL2:=(((CLOSE-MA10)/MA10)<0.3);  

偏离率:=(((PL1=1)AND(PL2=1))*0.2);  

平台突破:=((((偏离率=0)AND(REF(偏离率,1)=0.2))AND(REF((COUNT((偏离率=0.2),10)=10),1)=1))*-0.1);  

妖股突破:=平台突破=-0.1;  

XDF:=(暴利OR妖股突破);  

VARA:=DMA(AMOUNT/VOL/100,VOL/CAPITAL);  

VARAA:=DYNAINFO(7)/(REF(CLOSE,1))>1.05AND(DYNAINFO(7)/O>1.05);  

FLIGA:=(VOL/REF(VOL,1)>1.2ANDCOUNT(CLOSE>OPEN,1))OR(LOW>REF(HIGH,1)ANDCOUNT(OPEN>CLOSE,1)ANDVOL/REF(VOL,1)>1.2);  

XG:XDFANDC/REF(C,1)>1.095ANDFLIGAANDVARAA,COLORRED;  

牛熊线:DMA(MA(CLOSE+REF(CLOSE,5)/CLOSE*0.098,90),VOL),LINETHICK1,CIRCLEDOT,COLORYELLOW;  

小牛:=CROSS(C,牛熊线);  

DRAWTEXT(小牛,L,'↖走强区'),COLORRED,LINETHICK4;  

DRAWTEXT(ISLASTBAR,牛熊线,'牛熊线'),COLORYELLOW;  

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

操盘线:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)  

+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)  

+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,NODRAW;  

安全线:MA(操盘线,11),COLORGRAY,LINESTICK,LINETHICK1;  

MA20:MA(C,20),NODRAW;  

趋势线:MA(C,6)COLORGREEN,LINETHICK2;  

STICKLINE(趋势线>=MA20,CLOSE,OPEN,3,0),COLOR0000FF;  

STICKLINE(趋势线>=MA20,CLOSE,OPEN,0.5,0),COLORCC66FF;  

STICKLINE(MA20>趋势线,CLOSE,OPEN,3,0),COLORFF9900;  

STICKLINE(MA20>趋势线,CLOSE,OPEN,0.5,0),COLORFFCC00;  

大牛:=CROSS(趋势线,MA20);  

死牛:=CROSS(MA20,趋势线);  

DRAWTEXT(大牛,L,'↖行情开始'),COLORYELLOW,LINETHICK4;  

DRAWTEXT(死牛,H,'↖行情结束'),COLORWHITE,LINETHICK4;  

STICKLINE(CROSS(趋势线,MA20),OPEN,CLOSE,2,0),COLOR00FFFF;  

STICKLINE(CROSS(MA20,趋势线),OPEN,CLOSE,2,0),COLOR00DD00;  

VAR2:=O>MA(C,安全线)ANDC<MA(C,安全线);  

STICKLINE(CROSS(安全线,C),OPEN,CLOSE,2,0),COLORFF0000;  

AMA3:IF(趋势线/REF(趋势线,安全线)>0.997,趋势线,DRAWNULL),COLORBLUE,LINETHICK3;  

AMA4:IF(趋势线/REF(趋势线,安全线)>1.001,趋势线,DRAWNULL),COLORRED,LINETHICK3;  

WH1:=IF(L=LLV(L,9),L,0);  

WH2:=CONST(BARSLAST(WH1!=0));  

WH3:=CONST(IF(WH2=0,H,REF(H,WH2)));  

WH4:=CONST(REF(BARSLAST(H>WH3),WH2+1)+WH2+1);  

WH5:=CONST(IF(WH4=0,H,REF(H,WH4)));  

WH6:=CONST(REF(BARSLAST(H>WH5),WH4+1)+WH4+1);  

WH7:IF(CURRBARSCOUNT<=WH2+10,CONST(IF(WH6=0,H,REF(H,WH6))),DRAWNULL),COLORYELLOW,DOTLINE;  

DRAWTEXT(ISLASTBAR,WH7,'进场线'),COLORYELLOW;  

DP:=IF(C=INDEXC,0,1);  

GJ:=AMOUNT/V/100;

image.png

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。