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

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

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信利好指标公式

HLM1:=MA(HHV(H,485),17;

HLM2:=MA(HHV(H,222),17;

HLM3:=MA(HHV(H,96),17;

HLM4:=MA(LLV(L,485),17;

HLM5:=MA(LLV(L,222),17;

HLM6:=MA(LLV(L,96),17;

HLM7:=MA((HLM1*0.558+HLM2*0.558+HLM3*0.558+HLM4*0.96+HLM5*0.96+HLM6*0.96)/6,17);

HLM8:=MA((HLM1*0.55+HLM2*0.55+HLM3*0.65+HLM4*1.25+HLM5*1.23+HLM6*1.2)/6,17;

HLM9:=MA((HLM1*0.68+HLM2*0.68+HLM3*0.68+HLM4*1.3+HLM5*1.3+HLM6*1.3)/6,17);

HLM10:=MA((HLM7*3+HLM8*2+HLM9)/6*1.738,17;

HLM11:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1)*100;

HLM12:=MA(IF(C*1.35<=HLM10,HLM11*10,HLM11/10),3);

HLMH:=HHV(HLM12,30);

关注:MA(IF(L<=LLV(L,13),(HLMH+HLM11*2)/2,0),3)/200,ColorFFFfff;

DRAWTEXT(CROSS(关注,1.2),关注*0.5-6,’↑▲’)ColorFF00ff;

DRAWTEXT(CROSS(关注4.5)关注’买点出现’)Color00Ffff;

DRAWICON(CROSS(关注7.0)关注*0.5-2014)

VAR1:LLV(LOW,21);

VAR2:HHV(HICH,21);

AK1:EMA((((CLOSE-VAR1)/(VAR2-VAR1))*100).5);

AK:=EMA((((CLOSE-VAR1)/(VAR2-VAR1))*50),13);

DD:=EMA(((0.667*REF(AK1,1))+(0.333*AK1)),2);

VAR3:=LLV(LOW,55);

VAR4:=HHV(HIGH,34);

VAR5:=EMA((((CLOSE-VAR3)/(VAR4-VAR3))*100),3);

VAR6:=((AK+VAR5)/2);

VAR7:=EMA(((0.667*REF(VAR5,1))+(0.333*AK1)),2);

VAR8:=EMA(VAR6,5);

BB:=EMA(((0.667*REF(VAR8,1))+(0.333*VAR8)),2);

AB:=CROSS(AK1,AK);

BB1:=(CROSS(AK1,BB)AND(BB<30));

CD:=(BB1*0.6);

MR:=(AB=1)and(CD=0.6);

日 1EMA(C,1),COLORFFOOFF; COLORFF00FF

日EMA((H+L+C)/3,1);

日 5MA (EMA((H+L+C)/3,1),5);

日 10MA (EMA((H+L+C)/3,1),10);

对比日EMA(REF(日240)1)COLORWHITE;

对比日 5MA(EMA(REF(日240)1)5)

对比日 10MAEMA(REF(日240)1)10

强日 5>对比日 5 AND 日 10>对比日 10 AND 日 5对比日 5>0 AND 日 10对比日 10>0

角ATAN((日 10/REF(日 105)1)*100)*180/3.14115926>30

角 2ATAN((日 10/REF(日 105)1)*100)*180/3.14115926>20;

强日 5<对比日 5AND 日 10<对比日 10 AND 日 5-对比日 5>0AND 日 10-对比日 10>0

角=(ATAN((日 10/REF(日 105)-1)*100)*180/3.14115926)>30

角 2ATAN((日 10/REF(日 105)-1)*100)*180/3.14115926>20

弱日 5<对比日 5AND 日 10<对比日 10AND 日 5-对比日 5<0 AND 日 10-对比日 10<0 AND 对比日 5>REF(对比日 5

3)

STICKLINECROSS(日 5对比日 5)AND C>REF(C,150)AND 角日 5*1.05REF(LLV(对比日200)200)10

COLORRED;

STICKLINE(角 2日 5*0.98REF(LLV(对比日200)200)10)COLORYELLOW;

DRAWICON(CROSS(日 1对比日)AND C>REF(C,240),日 1*1.051)

DRAWKLINE(INDEXH,INDEXO,INDEXL,INDEXC);

image.png

二、通达信获利比例指标公式

  

ND1970:=(YEAR-1970)*365+INTPART((YEAR-1972)/4)-IF(INTPART(YEAR/4)=YEAR/4,1,0)+DAY+(MONTH-1)*30+IF(M  

ONTH<=8,INTPART(MONTH/2),INTPART((MONTH-7)/2)+4)-IF(MONTH>2AND  

INTPART(YEAR/4)=YEAR/4,1,IF(MONTH>2ANDNOT(INTPART(YEAR/4)=YEAR/4),2,0));  

C1:C;  

O1:REF(O,BARSLAST(ND1970-REF(ND1970,1)>WEEKDAY-REF(WEEKDAY,1)));  

H1:HHV(H,BARSLAST(ND1970-REF(ND1970,1)>WEEKDAY-REF(WEEKDAY,1))+1);  

L1:LLV(L,BARSLAST(ND1970-REF(ND1970,1)>WEEKDAY-REF(WEEKDAY,1))+1);  

WO1:="OCHL.O1#WEEK";  

WC:="OCHL.C1#WEEK";  

WH:="OCHL.H1#WEEK";  

WL:="OCHL.L1#WEEK";  

K1:=WO1=REF(WO1,1)ANDWC=REF(WC,1)ANDWH=REF(WH,1)ANDWL=REF(WL,1);  

K3:=REF(C,1)=DYNAINFO(3)ANDO=DYNAINFO(4)ANDC=DYNAINFO(7)ANDH=DYNAINFO(5)AND  

L=DYNAINFO(6);  

DD:=REF(BARSLAST(K1=0)+1,1),LINETHICK0;  

DD1:=CROSS(BACKSET((K1=0ORK3)ANDDD=5,4),0.5),NODRAW;  

DD2:=CROSS(BACKSET((K1=0ORK3)AND(DD=4ORDD=3),3),0.5),NODRAW;  

DD3:=CROSS(BACKSET((K1=0ORK3)ANDDD<=2,2),0.5),LINETHICK0;  

BK1:=DD1ORDD2ORDD3;  

BK2:=CROSS(BACKSET(K1=0,2),0.5);  

BK3:=CROSS(BACKSET(K1=0ANDREF(K1=0,1),2),0.5);  

WO:IF(BARSLAST(K1=0)=0,O,REF(O,BARSLAST(K1=0))),NODRAW;  

K0:=WC>WOOR(WC=WOANDWC>REF(WC,BARSLAST(K1=0)+1));  

STICKLINE(K0ANDBK1,WH,WC,0,0),COLORLIMAGENTA;  

STICKLINE(K0ANDBK1,WO,WL,0,0),COLORLIMAGENTA;  

STICKLINE(K0ANDK1=0,WC,WO,0,0),COLORLIMAGENTA;  

STICKLINE(K0AND(BK2ORK3),WC,WO,0,0),COLORLIMAGENTA;  

STICKLINE(K0AND((K1ANDBK2=0ANDK3=0)ORBK3),WC,WC,8,1),COLORLIMAGENTA;  

STICKLINE(K0AND((K1ANDBK2=0ANDK3=0)ORBK3),WO,WO,8,1),COLORLIMAGENTA;  

STICKLINE(NOT(K0)ANDBK1,WH,WO,0,0),COLORCYAN;  

STICKLINE(NOT(K0)ANDBK1,WC,WL,0,0),COLORCYAN;  

STICKLINE(NOT(K0)ANDK1=0,WC,WO,0,0),COLORCYAN;  

STICKLINE(NOT(K0)AND(BK2ORK3),WC,WO,0,0),COLORCYAN;  

STICKLINE(NOT(K0)AND((K1ANDBK2=0ANDK3=0)ORBK3),WC,WC,8,1),COLORCYAN;  

STICKLINE(NOT(K0)AND((K1ANDBK2=0ANDK3=0)ORBK3),WO,WO,8,1),COLORCYAN;  

MA1:MA(C,20),COLORWHITE;  

MA2:MA(C,60),COLORYELLOW;  

MA3:MA(C,120),COLORMAGENTA;  

VAR2:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;  

VAR3:=SMA(SMA(VAR2,3,1),3,1)/28.57;  

VAR4:=EMA(VAR3,5);  

VAR5:=3*VAR3-2*VAR4;  

AA:=CROSS(VAR5,VAR3)ANDVAR3<2.1ANDC>O;  

VAR6:=(2*CLOSE+HIGH+LOW)/4;  

VAR7:=LLV(LOW,13);  

VAR8:=HHV(HIGH,13);  

VAR9:=EMA((VAR6-VAR7)/(VAR8-VAR7)*100,13);  

VARA:=EMA(0.667*REF(VAR9,1)+0.333*VAR9,2);  

多:VAR9,COLORRED,POINTDOT;  

空:EMA(0.382*REF(VAR9,2)+0.618*VAR9,12),COLORGREEN;  

STICKLINE(VAR9>VARA,VAR9,VARA,6,0),COLORRED;  

STICKLINE(VAR9<=VARA,VAR9,VARA,6,0),COLORFFCC66;  

STICKLINE(AA,0,30,40,1),COLORYELLOW;  

STICKLINE(AA,16,29,38,0),COLORRED;  

STICKLINE(AA,1,14,38,0),COLORRED;  

STICKLINE(AA,15,15,40,1),COLORYELLOW;  

STICKLINE(AA,30,50,10,0),COLORYELLOW;  

STICKLINE(AA,53,55,10,1),COLORRED;  

STICKLINE(AA,57,59,10,1),COLORRED;  

STICKLINE(AA,61,63,10,1),COLORRED;  

STICKLINE(AA,65,67,10,1),COLORRED;  

STICKLINE(AA,69,75,12,0),COLORFFCCCC;  

DRAWTEXT(AA,85,'底'),COLORYELLOW;  

均39:MA(CLOSE,39),COLORRED;  

均72:MA(CLOSE,72),COLOR00FF00,POINTDOT,LINETHICK4;  

红色线上:均39+2*STD(CLOSE,72),COLORYELLOW,POINTDOT,LINETHICK4;  

红色线下:均39-2*STD(CLOSE,72),COLORYELLOW,POINTDOT,LINETHICK4;  

DRAWKLINE(HIGH,OPEN,LOW,CLOSE);  

CBFB:=COSTEX(C,REF(C,1));  

JL:=IF(C>CBFB,V,0);  

CL:=IF(C<CBFB,V,0);  

JLH:=SUM(JL,4);  

CLH:=SUM(CL,4);  

LHB:=CLH/JLH;  

TJ1:=IF(HHV(LHB,5)>4ANDCROSS(2,LHB)ANDC>=O,1,0);  

DRAWICON(TJ1,L*0.98,9);  

DS:="MFI.MFI"(12,9);  

A9:=DATETODAY(DATE);  

DS1:=IF(A9>7399{20110324},0,-DS);  

AJ2:=A9>146ANDA9<200;  

AI2:=A9>696ANDA9<750;  

AH2:=A9>1315ANDA9<1365;  

AA2:=A9>1854ANDA9<1904;  

AL2:=A9>3068ANDA9<3118;  

AK2:=A9>4709ANDA9<4759;  

AB2:=A9>5280ANDA9<5320;  

AC2:=A9>6520ANDA9<6570;  

AE2:=A9>6828ANDA9<6878;  

AF2:=A9>7132ANDA9<7182;  

AG2:=A9>7341ANDA9<7391;  

AH1:=A9>786ANDA9<826;  

AI1:=A9>520ANDA9<570;  

AG1:=A9>1360ANDA9<1410;  

AL1:=A9>2333ANDA9<2383;  

AA1:=A9>3826ANDA9<3876;  

AK1:=A9>4856ANDA9<4906;  

AB1:=A9>6142ANDA9<6192;  

AC1:=A9>6802ANDA9<6852;  

AE1:=A9>6912ANDA9<6962;  

AF1:=A9>7264ANDA9<7304;  

顶:=REF(HHV(H,94),3),NODRAW;  

绝顶:=REFDATE(顶,DATE),NODRAW;  

跑:=绝顶=HAND((C-L)<(O-C)OR(O-L)<(C-O)),NODRAW;  

STICKLINE(跑,C,O,3,0),COLOR777777;  

STICKLINE(跑,C,O,2,0),COLORAAAAAA;  

STICKLINE(跑,C,O,1,0),COLORCCCCCC;  

STICKLINE(跑,C,O,0.1,0),COLORFFFFFF;  

STICKLINE(跑,L,H,0,0),COLORFFFFFF;  

DRAWTEXT(跑,C*1.02,'绝顶')COLORFFFFFF;  

VAR28:=REF(CLOSE,1);  

VAR29:=SMA(MAX(CLOSE-VAR28,0),5.5,1)/SMA(ABS(CLOSE-VAR28),6,1)*100;  

VAR4A:=EMA(CLOSE,3);  

DRAWICON(COUNT(REF(VAR4A,1)<REF(VAR4A,2),5)=5ANDVAR4A>REF(VAR4A,1),L*0.99,3);  

B36:=MA(CLOSE,6)-MA(CLOSE,12);  

B612:=MA(CLOSE,12)-MA(CLOSE,24);  

J:=((B36)/(CLOSE))*(17);  

J1:=((B612)/(CLOSE))*(17);  

DRAWTEXT((J<(-0.2))AND(J1<(-0.2))ANDCROSS(J,J1),(LOW)*(0.976),'红色抬阶'),COLORRED;  

DRAWBAND(MA(CLOSE,5),RGB(155,50,50),MA(CLOSE,10),RGB(83,123,68));  

DRAWKLINE(H,O,L,C);  

MA5:MA(CLOSE,5),COLORWHITE;  

MA10:MA(CLOSE,10),COLORYELLOW;  

MA20:MA(CLOSE,24),COLORMAGENTA;  

MA60:MA(CLOSE,60),COLORGREEN;  

MA120:MA(CLOSE,120),COLORLIMAGENTA;  

MA240:MA(CLOSE,240),COLORBLUE;  

DRAWICON(CROSS(MA10,MA20),MA20,1);{10日上穿20日做记号}  

DRAWICON(CROSS(MA20,MA60),MA60,1);{20日上穿60日做记号}  

DRAWICON(CROSS(MA20,MA120),MA120,1);{20日上穿60日做记号}  

DRAWICON(CROSS(MA20,MA240),MA240,1);{20日上穿120日做记号}  

DRAWICON(CROSS(MA60,MA120),MA60,1);{60日上穿120日做记号}  

DRAWICON(CROSS(MA60,MA240),MA240,1);{60日上穿240日做记号}  

DRAWICON(CROSS(MA120,MA240),MA240,1);{120日上穿240日做记号}  

DRAWICON(CROSS(MA10,MA5),MA10,2);{5日下穿10日做记号}  

DRAWICON(CROSS(MA20,MA10),MA20,2);{10日下穿20日做记号}  

DRAWICON(CROSS(MA60,MA20),MA60,2);{20日下穿60日做记号}  

DRAWICON(CROSS(MA120,MA60),MA60,2);{60日下穿120日做记号}  

反弹托:=MA5>MA20ANDMA5>MA20ANDMA20<MA60ANDMA60<MA120ANDCROSS(MA10,MA20);  

月价托:=MA5>MA20ANDMA20>MA60ANDMA60>MA120ANDMA5>MA20ANDCROSS(MA10,MA20);  

季价托:=MA20>MA60ANDMA20>MA60ANDCROSS(MA20,MA60);  

短长价托:=MA5>MA60ANDMA5>MA10ANDCROSS(MA10,MA60);  

半年托:=MA60>MA120ANDMA60>MA120ANDCROSS(MA60,MA120);  

熊来:=MA60<MA120ANDMA60<MA120ANDCROSS(MA120,MA60);  

年托:=MA120>MA240ANDMA120>MA240ANDCROSS(MA120,MA240);  

月蜘蛛:=MA5>MA10ANDMA10>MA20ANDCROSS(MA5,MA20)ANDCROSS(MA10,MA20);  

DRAWTEXT(月蜘蛛,MA20-0.08,'金蜘蛛'),COLORMAGENTA;  

DRAWTEXT(反弹托,MA20-0.08,'反弹托'),COLORMAGENTA;  

DRAWTEXT(月价托,MA20-0.2,'月托'),COLORMAGENTA;  

DRAWTEXT(季价托,MA60-0.0.08,'季托'),COLORMAGENTA;  

DRAWTEXT(短长价托,L+0.015,'短长托'),COLOR36C0C1;  

DRAWTEXT(半年托,MA120-0.08,'牛市来'),COLORRED;  

DRAWTEXT(熊来,MA60+0.08,'小心熊'),COLORGREEN;  

DRAWTEXT(年托,MA240-0.08,'年托'),COLORRED;  

压:=MA10<MA20ANDMA20>MA10ANDCROSS(MA20,MA10);  

DRAWTEXT(压,MA20+0.012,'压'),COLORYELLOW;  

{舞风时节}  

vol5:=MA(VOL,5),COLORWHITE;  

VOL10:=MA(VOL,10),COLORYELLOW;  

VOL40:=MA(VOL,40),COLORFF00FF;  

量托:=VOL5>=VOL40ANDCROSS(VOL10,VOL40)ANDREF(VOL10,1)<REF(VOL40,1);  

DRAWTEXT(量托,L-0.012,'量托'),COLORWHITE;  

AA1:=BARSLAST(MA60>MA20AND(MA20=MA10ORMA20>MA10));  

BB1:=REF(COUNT(C<MA60,AA1)=AA1,1);  

CC1:=CROSS(C,MA60)ANDVOL>MA(VOL,5)AND(C-REF(C,1))/REF(C,1)*100>3;  

芙蓉出水:=BBANDCC1,COLOR00FF00;  

DRAWTEXT(芙蓉出水,H+0.12,'芙蓉出水'),COLORFF00FF;  

STICKLINE(芙蓉出水,H,L,0.5,1),COLORFF00FF;  

STICKLINE(芙蓉出水,O,C,4,1),LINETHICK2,COLORFF00FF;  

MA1:=MA(CLOSE,5);  

MA2:=MA(CLOSE,10);  

MA3:=MA(CLOSE,30);  

ZJ:=AMOUNT/10000;{资金}  

TM:=V-MA(V,10);{量填满}  

一穿三:=MA1>OANDMA2>OANDMA3>OANDMA1<CANDMA2<CANDMA3<CANDCLOSE>OPEN;  

DRAWTEXT(一穿三,L-0.012,'穿三线'),COLORFF00FF;  

C6:=REF(C,1);  

涨停:=IF((C-C6)*100/C6>=(10-0.01*100/C6),1,0);  

STICKLINE(涨停,OPEN,CLOSE,2,0),COLORMAGENTA;  

STICKLINE(涨停,H,L,0,0),COLORLIRED;  

{压力一}  

TY:=C;  

A1:=REF(TY,10)=HHV(TY,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);HD:=FILTER(C1,10);  

A2:=REF(TY,10)=LLV(TY,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);LD:=FILTER(C2,10);  

前期高位:REF(C,BARSLAST(HD)),COLOR00FF00,POINTDOT;  

STICKLINE(C,前期高位,前期高位,8,0),COLORYELLOW;

  

流通盘:=CAPITAL/1000000,COLOR7F00FF,LINETHICK0;  

ZLCM:=EMA(WINNER(CLOSE)*70,3);{//主力筹码估算}  

SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{//散户筹码估算}  

ZSHTL:=SHCM/(ZLCM+SHCM)*200;{//散户套牢筹码比率}  

ZZLKP:=ZLCM/(ZLCM+SHCM)*200;{//主力控盘筹码比率}  

ZCMZL:=MA(ZLCM+SHCM,13);{//市场筹码总量}  

ZZNTS:=BARSLAST(ZSHTL<90ANDREF(ZSHTL,1)>90);{//走牛天数}  

ZSHJJ:=EMA(ZSHTL,89);{//散户警戒}  

ZZLJJ:=EMA(ZZLKP,89);{//主力警戒}  

ZJLRQD:=INTPART(ZZLKP-ZZLJJ);{//资金流入强度}  

SH8:=EMA(ZSHTL,8);  

DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);  

散户套牢线1:=INTPART(ZSHTL),COLORFFEEBB,LINETHICK2;  

主力控盘线1:=INTPART(ZZLKP),COLOR4D4DFF,LINETHICK2;  

DRAWBAND(主力控盘线1,RGB(0,255,255),散户套牢线1,RGB(50,50,50));  

{柱状线}  

STICKLINE(((主力控盘线1>REF(主力控盘线1,1))AND(主力控盘线1>100)),主力控盘线1,散  

户套牢线1,2,0),COLOR8000FF;  

散:INTPART(ZSHTL),COLORFFEEBB,LINETHICK2;  

主力:INTPART(ZZLKP),COLOR4D4DFF,LINETHICK2;  

{资金流入线:ZJLRQD,,COLOR7F00FF,LINETHICK2;  

资金强弱线:15,COLORFF80FF,LINETHICK2,CROSSDOT;  

控盘临界线:55,COLORFF937F,LINETHICK2,CROSSDOT;  

强势控盘线:75,COLORFF3399,LINETHICK2,CROSSDOT;};  

{主力监控}  

B1:=(HHV(H,35)-C)/(HHV(H,35)-LLV(LOW,35))*100-35;  

B2:=SMA(B1,35,1)+100;  

B3:=(C-LLV(L,35))/(HHV(H,35)-LLV(L,35))*100;  

B4:=SMA(B3,3,1);  

B5:=SMA(B4,3,1)+100;  

B6:=B5-B2;  

控盘程度:(IF(B6>1,B6-1,0))*2.5,COLORRED,LINETHICK2;  

控盘度:100,COLORWHITE;  

{柱状线}  

控盘上:IF(控盘程度>REF(控盘程度,1),控盘程度,DRAWNULL),  

STICK,COLORYELLOW,LINETHICK1;  

控盘下:IF(控盘程度<REF(控盘程度,1),控盘程度,DRAWNULL),  

STICK,COLORFF9900,LINETHICK1;  

进:IF(控盘程度>REF(控盘程度,1),5,DRAWNULL),CIRCLEDOT,COLORYELLOW;  

出:IF(控盘程度<REF(控盘程度,1),5,DRAWNULL),CIRCLEDOT,COLORFF9900;  

{SAR}  

持币:IF(SAR(10,2,20)>=H,100,DRAWNULL),CIRCLEDOT,COLORBLUE;  

持股:IF(SAR(10,2,20)<=L,100,DRAWNULL),CIRCLEDOT,COLORRED;

{N1(2,200,20)N2(2,200,40)N3(2,200,60)}

MA1:=MA(CLOSE,N1);

MA2:=MA(CLOSE,N2);

MA3:=MA(CLOSE,N3);

TUO:=COUNT(CROSS(MA1,MA2),21)=1 AND CROSS(MA2,MA3) AND

COUNT(CROSS(MA1,MA3),21)=1 AND

BARSLAST(CROSS(MA1,MA2))>BARSLAST(CROSS(MA1,MA3)) AND

BARSLAST(CROSS(MA1,MA3))>BARSLAST(CROSS(MA2,MA3)) AND

MA1>REF(MA1,1);

条件选股公式——短线是银之三金叉见底

ND := 5;

DOWN := CLOSE/LLV(LOW,60)<=1.2;

PMA1 := MA(CLOSE,5);

PMA2 := MA(CLOSE,10);

VMA1 := MA(VOL,5);

VMA2 := MA(VOL,10);

DIFF := EMA(CLOSE,12) – EMA(CLOSE,26);

DEA := EMA(DIFF,9);

PPDAY := BARSLAST(CROSS(PMA1,PMA2));

YDAY := BARSLAST(CROSS(VMA1,VMA2));

MACDDAY := BARSLAST(CROSS(DIFF,DEA));

SJCJD:= IF((PPDAY<=ND AND DAY<=ND AND MACDDAY<=ND),1,0);

SJCJD

条件选股公式——短线是银之双价托

{N1(1,300,20)N2(1,300,40)N3(1,300,60)}

MA1:=MA(CLOSE,N1);

MA2:=MA(CLOSE,N2);

MA3:=MA(CLOSE,N3);

TUO:=COUNT(CROSS(MA1,MA2),21)=1 AND CROSS(MA2,MA3){COUNT(CROSS(MA2,MA3),21)=1} AND

COUNT(CROSS(MA1,MA3),21)=1 AND

BARSLAST(CROSS(MA1,MA2))>BARSLAST(CROSS(MA1,MA3)) AND

BARSLAST(CROSS(MA1,MA3))>BARSLAST(CROSS(MA2,MA3)) AND

MA1>REF(MA1,1);

A1:=TUO AND REF(BARSLAST(TUO),1)<89;

条件选股公式——短线是银之东方红大阳升

HSL:=V/CAPITAL*100;

YB:=HSL>4 AND C>REF(C,1);

A1:=COUNT(YB,13)>=3;

A2:=C/REF(C,1)>1.049 AND HSL>5;

A3:=REF(SUMBARS(V,CAPITAL),13)>89;

A4:=HIGH/C<1.021;

A5:=COUNT(C/REF(C,1)>1.04,10)<5;

A6:=IF(COUNT(HSL>4,5)>=3,0,1);

ZTJ:=A1 AND A2 AND A3 AND A4 {AND A5 AND A6};

ZTJ AND (REF(BARSLAST(ZTJ),1)>20 OR BARSSINCE( ZTJ)=0)

条件选股公式——短线是银之多方叠叠炮

A1:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE>OPEN;

TJ:=A1 AND REF(BARSLAST(A1),1)<9 AND C/REF(C,10)>1.1;

条件选股公式——短线是银之猎豹出击

M1:=MA(C,60);

A1:=COUNT(C<M1,33)>31;

A2:=CROSS(C,M1);

A3:=C/REF(C,1)>1.045;

A1 AND A2 AND A3

条件选股公式——短线是银之金蜘蛛

{N1(1,300,5)N2(1,300,10)N3(1,300,20)}

MA1:=MA(CLOSE,N1);

MA2:=MA(CLOSE,N2);

MA3:=MA(CLOSE,N3);

A1:=COUNT(CROSS(MA2,MA3),2)=1;

A2:=COUNT(CROSS(MA1,MA3),2)=1;

A1 AND A2

条件选股公式——短线是银之多方炮

A1:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE>OPEN;

条件选股公式——短线是银之天上井地下井

M1:=MA(C,5);

M2:=MA(C,10);

M3:=MA(C,20);

M4:=MA(C,30);

TSJ:=COUNT(CROSS(M3,M1),21)=1 AND COUNT(CROSS(M4,M1),21)>0 AND

COUNT(CROSS(M3,M2),21)>0 AND COUNT(CROSS(M4,M2),21)>0;

MM1:=MA(V,5);

MM2:=MA(V,10);

MM3:=MA(V,20);

MM4:=MA(V,30);

DXJ:=COUNT(CROSS(MM3,MM1),21)=1 AND COUNT(CROSS(MM4,MM1),21)>0 AND

COUNT(CROSS(MM3,MM2),21)>0 AND COUNT(CROSS(MM4,MM2),21)>0;

ZTJ:=COUNT(TSJ,13)>0 AND COUNT(DXJ,13)>0;

ZTJ AND (REF(BARSLAST(ZTJ),1)>20 OR BARSSINCE( ZTJ)=0)

条件选股公式——短线是银之青龙取水

A1:=MIN(MA(C,5),MA(C,10))>MA(C,60) AND CROSS(MA(C,5),MA(C,10));

A2:=MIN(MA(C,5),MA(C,10))/MA(C,60)<1.05;

A3:=COUNT(V<MA(V,10),10)>6;

A1 AND A2 AND A3

条件选股公式——短线是银之一阳上穿三角托

{N1(1,300,20)N2(1,300,40)N3(1,300,60)}

MA1:=MA(CLOSE,N1);

MA2:=MA(CLOSE,N2);

MA3:=MA(CLOSE,N3);

TUO:=COUNT(CROSS(MA1,MA2),21)=1 AND CROSS(MA2,MA3){COUNT(CROSS(MA2,MA3),21)=1} AND

COUNT(CROSS(MA1,MA3),21)=1 AND

BARSLAST(CROSS(MA1,MA2))>BARSLAST(CROSS(MA1,MA3)) AND

BARSLAST(CROSS(MA1,MA3))>BARSLAST(CROSS(MA2,MA3)) AND

MA1>REF(MA1,1);

A1:=C>MAX(MA1,MAX(MA2,MA3)) AND O<MIN(MA1,MIN(MA2,MA3));

A2:=COUNT(A1,21)=1;

TUO AND A2

条件选股公式——短线是银之量顶天立地

A1:=V=HHV(V,120);

A2:=C/OPEN>1.049;

TJ:=A1 AND A2;

TJ AND (REF(BARSLAST(TJ),1)>80 OR BARSSINCE(TJ)=0);

条件选股公式——短线是银之量托

{N1(1,100,5)N2(1,100,10)N3(1,100,20)}

MA1:=MA(V,N1);

MA2:=MA(V,N2);

MA3:=MA(V,N3);

TUO:=COUNT(CROSS(MA1,MA2),21)=1 AND CROSS(MA2,MA3){COUNT(CROSS(MA2,MA3),21)=1} AND

COUNT(CROSS(MA1,MA3),21)=1 AND

BARSLAST(CROSS(MA1,MA2))>BARSLAST(CROSS(MA1,MA3)) AND

BARSLAST(CROSS(MA1,MA3))>BARSLAST(CROSS(MA2,MA3)) AND

MA1>REF(MA1,1);

TUO

条件选股公式——短线是银之黑码草上飞

LCZ:=(C-MA(C,60))/MA(C,60)*100;

A1:=COUNT(MA(C,60)>REF(MA(C,60),1),100)>95;

A2:=COUNT(LCZ<20,100)>95;

A3:=COUNT(C>MA(C,60),100)>80;

A4:=C/REF(C,1)>1.04;

A5:=V/CAPITAL*100>2.8;

ZTJ:=A1 AND A2 AND A3 AND A4 AND A5;

ZTJ AND (REF(BARSLAST(ZTJ),1)>20 OR BARSSINCE( ZTJ)=0)

条件选股公式——短线是银之放量过头

highprice := hhv(high,60); {60 日内最高价}

A1:= Close>highprice;{股价在冲击前高位}

A2:= (vol>ma(vol,5)*2.5) or (COUNT(Vol>ma(vol,10),6)>4);{近期明显放量}

A1 AND A2

image.png

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

画带状线

输出天:收盘价的5日指数移动平均画白色,线宽为1

输出人:收盘价的13日指数移动平均线宽为1

输出生命线:收盘价的55日指数移动平均,画红色,线宽为2

当满足条件是否最后一个周期时,在生命线位置书写文字,线宽为3

推荐阅读:通达信最牛指标公式

  

V1:=(C*2+H+L)/4*10;  

V2:=EMA(V1,13)-EMA(V1,34);  

V3:=EMA(V2,5);V4:=2*(V2-V3)*5.5;  

主力撤:IF(V4<=0,V4,0),colorblue;  

主力进:IF(V4>=0,V4,0),colorff00ff;  

V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDE  

XL,8))*8;  

V6:=EMA(3*V5-2*SMA(V5,18,1),5);  

V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDE  

XL,8))*10;  

V8:=(INDEXC*2+INDEXH+INDEXL)/4;  

V9:=EMA(V8,13)-EMA(V8,34);  

VA:=EMA(V9,3);  

VB:=(V9-VA)/2;  

大盘资金进场:IF(VB>=0,VB,0),Colorred;  

大盘资金撤走:IF(VB<=0,VB,0),colorgreen;  

V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,  

1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,  

5,1),3,1);  

趋势线:EMA(V11,3);  

V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;  

准备现金:STICKLINE(趋势线<=13,0,20,5,0),colorcc9900;  

aa:=(趋势线<=13)andfilter((趋势线<=13),15);  

drawtext(aa,30,'准备现金'),colorcc9900;  

买入股票:STICKLINE(趋势线<=13AND  

V12>13,0,50,5,0),color0099ff;  

bb:=(趋势线<=13ANDV12>13)andfilter((趋势线<=13AND  

V12>13),10);  

drawtext(bb,60,'买入股票'),color0099ff;  

卖临界:STICKLINE(趋势线>90and趋势线>ref(趋势  

线,1),100,95,15,1),COLORFFFF00;  

见顶清仓:filter(趋势线>90and趋势线<ref(趋势线,1)and主力  

进<ref(主力进,1),8);  

DRAWTEXT(见顶清仓,90,'逃顶'),coloryellow;  

cc:=(趋势线>=90ANDV12)andfilter((趋势线>=90AND  

V12),10);  

stickline(大盘资金进场and趋势线<13,0,30,10,0),colorred;  

stickline(大盘资金撤走and趋势线>90,0,30,10,0),colorgreen;  

stickline(主力进and趋势线<13,0,40,10,0),colorff00ff;  

stickline(主力撤and趋势线>90,0,40,10,0),colorblue;  

ZJ:EMA(C,13),COLOR0000FF;  

HY:EMA(C,20),COLORFF00FF;  

ZJ升:IF(ZJ>REF(ZJ,1),ZJ,DRAWNULL),COLORRED,LINETHICK2;  

ZJ降:IF(ZJ<=REF(ZJ,1),ZJ,DRAWNULL),COLORBLUE,LINETHICK2;  

HY升:IF(HY>REF(HY,1),HY,DRAWNULL),COLORFF00FF,LINETHICK2;  

HY降:IF(HY<REF(HY,1),HY,DRAWNULL),COLORFFAA00,LINETHICK2;  

STICKLINE(C>ZJ,H,L,0,0),COLORRED;  

STICKLINE(C>ZJ,C,O,-1,1),COLORRED;  

STICKLINE(C=ZJ,H,L,0,0),COLORFFFFFF;  

STICKLINE(C<ZJ,H,L,0,0),COLOR00FFFF;  

STICKLINE(C<ZJ,O,C,-1,1),COLOR00FFFF;  

STICKLINE(C<HY,O,C,-1,1),COLORFFFF00;  

STICKLINE(C<HY,H,L,0,0),COLORCYAN;  

DRAWTEXT(CROSS(C,ZJ),L,'B'),COLOR00FFFF;  

DRAWTEXT(CROSS(C,HY),L*0.99,'B'),COLORFFFF00;  

DRAWTEXT(CROSS(ZJ,C),H,'S'),COLOR00FFFF;  

DRAWTEXT(CROSS(HY,C),H*1.01,'S'),COLORFFFF00;  

VAR1:=MA(HHV(HIGH,485),17);  

VAR2:=MA(HHV(HIGH,222),17);  

VAR3:=MA(HHV(HIGH,96),17);  

VAR4:=MA(LLV(LOW,485),17);  

VAR5:=MA(LLV(LOW,222),17);  

VAR6:=MA(LLV(LOW,96),17);  

VAR7:=MA((VAR4*0.96+VAR5*0.96+VAR6*0.96+VAR1*0.558+VAR2*0.558+VAR3*0.558)  

/6,17);  

VAR8:=MA((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR1*0.55+VAR2*0.55+VAR3*0.65)/6,17);  

VAR9:=MA((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR1*0.68+VAR2*0.68+VAR3*0.68)/6,17);  

VARA:=MA((VAR7*3+VAR8*2+VAR9)/6*1.738,17);  

VARB:=IF(DATE<=1341231,VARA,VARA*DAY);  

VARC:=LOW;  

VARD:=REF(LOW,1);  

VARE:=SMA(ABS(VARC-VARD),3,1)/SMA(MAX(VARC-VARD,0),3,1)*100;  

VARF:=MA(IF(CLOSE*1.35<=VARB,VARE*10,VARE/10),3);  

VAR10:=LLV(LOW,30);  

VAR11:=HHV(VARF,30);  

VAR12:=1341231;  

IF(DATE<=VAR12,MA(IF(LOW<=VAR10,(VARF+VAR11*2)/2,0),3),100000000);  

HPTP横盘突破}  

{代表横盘天数代表股价整理的幅度}  

N:=7;N1:=20;  

v1:=REF(((HHV(H,N)-LLV(L,N))/LLV(L,N)),1)<=(N1/100)AND  

C>=REF(HHV(H,N),1)ANDBARSCOUNT(C)>N;  

横盘突破选股xg1:if(v1,1,0);  

横盘  

A1:=SUM(C>MA(C,55),5);  

A2:=MA(V,1)<0.5;  

A3:=V/REF(V,1)<0.5;  

A4:=REF(A1,1);  

A5:=A3/A4<0.5;  

a55:=MA(V,5)/MA(REF(V,5),1);  

A6:=1.2<a55anda55<1.5;  

盘中缩量:=A1ANDA2ANDA3ANDA4ANDA5ANDA6;  

B1:=REF(EVERY(C<MA(C,55),5),5);  

B2:=(C>=MA(C,55));  

B3:=V=HHV(V,5);  

B4:=REF(C,1)>REF(O,1)ANDREF(C,2)<REF(O,2)ANDREF(O,1)<REF(C,2);  

低位放量:=B1ANDB2ANDB3ANDB4;  

个股涨幅:=(C-REF(C,1))/REF(C,1)*100;  

大盘涨幅:=(INDEXC-REF(INDEXC,1))/REF(INDEXC,1)*100;  

跑赢大盘:=个股涨幅>=大盘涨幅;  

波动幅度:=0.01<((HIGH-LOW)/CLOSE)and((HIGH-LOW)/CLOSE)<0.02;  

最低价a:=L>REF(L,1)ANDL=REF(L,1);  

XG:盘中缩量AND低位放量AND跑赢大盘AND波动幅度AND最低价a;  

n天横盘突破想选几天就选几天可选股  

input:n(5);  

aa:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;  

ab:=HHv(c,n)/llv(c,n)<1.50andcount(c>o,n)>=1andcount(c<o,n)>=1and  

count(l>ref(l,1),n)<=3;  

横盘突破:ref(aa,1)andc>oand(c-o)>ref(hhv(abs(c-o),n),1)*1.3andc>ref(hhv(h,n),1);  

n天横盘突破想选几天就选几天可选股  

你想选几天突破就选几天突破N为天数参数,N可调  

飞狐横盘选股  

a1:=ma(c,p1);  

BIAS:=(CLOSE-a1)/a1*100;  

a2:=(a1-ref(a1,1))/a1*100;  

横盘选股:count(abs(bias)<p3anda2<p3,p2)=p2  

参数暂时设为20,2,5  

思路是20日乖离小于2,20日均线横走变化小于3%。  

横盘30日但股价振幅在%10上下。  

M:=30;  

振幅:=100*(HHV(H,M)-LLV(L,M))/LLV(L,M);  

DYNAINFO(9)>0AND振幅<10;

NDA:=HHVBARS(HIGH,120);{120日内最高价的周期数}  

NDAY1:=NDA-10;{最高点之后10日}  

NDAY2:=NDA+10;{庄家应该在NDAY1–NDAY2之间吸纳大部分筹码}  

A1:=NDA>=30;{确保高点出现的周期数大于30}  

A2:=REF(SUM(VOL,20),NDAY1)>FINANCE(7)*0.4;{吸纳40%}  

VMA:=MA(VOL,40);{40日量均线}  

A3:=COUNT(VOL<VMA,NDAY1)/NDAY1>0.9;{成交量呈现芝麻点}  

A4:=CLOSE>=HHV(HIGH,120);{股价在冲击前高位}  

A5:=COUNT(VOL<(MA(VOL,10)*1.3),10)>8;{近期无明显放量}  

A1ANDA2ANDA3ANDA4ANDA5  

MA5:=MA(CLOSE,5);  

MA10:=MA(CLOSE,10);  

MA60:=MA(CLOSE,60);  

PDAY1:=BARSLAST(CROSS(MA60,MA5));{5日均线下穿60日均线}  

PDAY2:=BARSLAST(CROSS(MA60,MA10));{10日均线下穿60日均线至此形成鸭颈部}  

PDAY3:=BARSLAST(LOW=LLV(LOW,PDAY2));{形成头部要反弹}  

PDAY4:=BARSLAST(CROSS(MA5,MA10));{反弹后5日均线和10日均线金叉}  

PDAY5:=BARSLAST(CROSS(MA10,MA5));{反弹不久5日均线和10日均线形成死叉形成嘴部}  

A1:=PDAY1>PDAY2ANDPDAY2>PDAY3ANDPDAY3>PDAY4ANDPDAY4>PDAY5ANDPDAY5<5;  

A2:=COUNT(CROSS(MA10,MA5),PDAY2)=1;  

A1ANDA2

image.png

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