通达信 几个选股指标,几个看盘技术指标 的源码,原版转载,也没分清楚到底几个公式,晕死我了。
大家包涵,如果不是很有时间的,请飘过吧。
N:=34;M:=3;
28,COLORFFFFFF;
STICKLINE(C>0,0,2,5,0),COLOR00008A;
STICKLINE(C>0,2,5,5,0),COLOR85008A;
STICKLINE(C>0,5,10,5,0),COLOR657600;
STICKLINE(C>0,10,21.5,5,0),COLOR690079;
STICKLINE(C>0,21.5,28,5,0),COLOR79B715;
VAR1:=EMA(100*(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N)),M)/4,COLORFFFF00,LINETHICK2;
VAR2:IF(VAR1>23.16,VAR1,0),COLOR00FFFF,LINETHICK1;
BB:IF(VAR1<2,6,0),COLOR00FFFF,LINETHICK4;
DD:IF(VAR1>21.5,25.5,28),COLOR0000FF,LINETHICK4;
AA:IF(VAR1>23.16,24.5,28),COLORRED,LINETHICK4;
DRAWBAND(BB,RGB(190,0,100),0,RGB(0,0,0));
DRAWBAND(VAR2,RGB(250,250,0),0,RGB(0,0,0));
DRAWBAND(28,RGB(210,210,210),DD,RGB(0,0,0));
DRAWBAND(28,RGB(250,250,0),AA,RGB(0,0,0));
STICKLINE(C>0,2,2,2,0),COLOR00FFFF;
STICKLINE(C>0,5,5,2,0),COLORFFFF00;
STICKLINE(C>0,23.16,23.16,2,0),COLORFF0000;
财貌双拳:VAR1,,COLORFFFF00,LINETHICK2;
DRAWICON(CROSS(财貌双拳,2),2,23);
DRAWICON(CROSS(财貌双拳,5),5,13);
DRAWICON(CROSS(21.5,财貌双拳),21.5,14);
DRAWICON(CROSS(23.16,财貌双拳),23.16,15);
DRAWTEXT(CURRBARSCOUNT=38,1,'底部区'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=38,3.5,'介入区'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=38,7.5,'加仓区'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=38,16,'安全区'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=38,22,'风险区'),COLOR0000FF;
DRAWTEXT(CURRBARSCOUNT=38,25.5,'逃顶区'),COLORFF00FF;
N:=3;
M:=6;
VARS:=100;
VARZQ:=30;
RSV:=(CLOSE-LLV(LOW,VARZQ))/(HHV(HIGH,VARZQ)-LLV(LOW,VARZQ))*VARS;
K:=SMA(RSV,5,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
HS:=VOL/CAPITAL;
SH:=(HHV(HIGH,VARZQ)-CLOSE)/(HHV(HIGH,VARZQ)-LLV(LOW,VARZQ))*VARS-10;
JG:=(CLOSE-LLV(LOW,VARZQ))/(HHV(HIGH,VARZQ)-LLV(LOW,VARZQ))*VARS;
GF:=SMA(JG,13,8);
DDGF:=GF-REF(GF,1);
DTGF:=HS*DDGF*100/4;
VARZLSCGF:=(30+SUM(DTGF,0));
跟风统计:SUM(DTGF,0)+30,LINETHICK1,COLORCYAN;
STICKLINE(DTGF>0,VARZLSCGF,VARZLSCGF+DTGF,1,0),COLORRED;
STICKLINE(DTGF<0,VARZLSCGF+DTGF,VARZLSCGF,1,0),COLORGREEN;
DRAWTEXT_FIX(C>0,0.005,0.02,0,'QQ:1418293479'),COLORBROWN;
D1:=LLV(L,34);
D2:=SMA(ABS(L-REF(L,1)),34,1);
D3:=SMA(MAX(L-REF(L,1),0),34,2);
DD:-(EMA(IF(L<=D1,D2/D3,-3),9)),STICK,COLORRED,LINETHICK1;
F1:=LLV(L,8);
F2:=SMA(ABS(L-REF(L,1)),34,1);
F3:=SMA(MAX(L-REF(L,1),0),34,2);
A:-(EMA(IF(L<=F1,F2/F3,-3),9)),COLORYELLOW,LINETHICK1;
A1:IF(A<0,A,0),STICK,COLORGREEN,LINETHICK1;
DRAWICON(REF(A,1)<0 AND REF(A,2)>REF(A,1) AND A>REF(A,1),0,34);
A2:IF(FILTER(REF(A,1)<0 AND REF(A,2)>REF(A,1) AND A>REF(A,1),3),2.6,0),COLORGREEN,LINETHICK3,STICK;
XG:=FILTER(REF(A,1)<0 AND REF(A,2)>REF(A,1) AND A>REF(A,1),3);
DRAWICON(XG ,1.0,9);
DRAWICON(XG ,1.35,9);
DRAWICON(XG ,1.7,9);
DRAWICON(XG ,2.05,9);
DRAWICON(XG ,2.45,9);
VAR1:=(HIGH+LOW+OPEN+2*CLOSE)/5;
VAR2:=REF(VAR1,1);
VAR3:=SMA((CLOSE-VAR2),6,1)/SMA(ABS(CLOSE-VAR2),6,1)*100;
VAR4:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;
VAR5:=EMA(0.667*REF(VAR4,1)+0.333*VAR4,5);
VAR6:=IF(VOL>=1.3*MA(VOL,5) AND COUNT(VAR4>=VAR5 AND VAR4<-17,3) AND REF(LOW,1)=LLV(LOW,120),1,0);
VAR7:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;
MC:(FILTER(REF(VAR3,1)>81 AND VAR3<80 OR CROSS(82,VAR7),5))*2,COLORCYAN,LINETHICK3,STICK;
DRAWICON(FILTER(REF(VAR3,1)>81 AND VAR3<80 OR CROSS(82,VAR7),5),2.3,35);
DRAWICON(FILTER(REF(VAR3,1)>81 AND VAR3<80 OR CROSS(82,VAR7),5),1.8,2);
DRAWTEXT(FILTER(REF(VAR3,1)>81 AND VAR3<80 OR CROSS(82,VAR7),5),1.8,'-卖');
高1:=REF(HHV(H,150),3);
低1:=REF(LLV(L,150),3);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
{顶:REFDATE(高1,DATE),POINTDOT,COLORWHITE;}
%19:=REFDATE(H1,DATE),POINTDOT,COLORYELLOW,LINETHICK3;
%38:=REFDATE(H2,DATE),POINTDOT,COLORMAGENTA,LINETHICK3;
%50:=REFDATE(H3,DATE),POINTDOT,COLORBLUE,LINETHICK3;
%61:=REFDATE(H4,DATE),POINTDOT,COLORRED,LINETHICK3;
%80:=REFDATE(H5,DATE),POINTDOT,COLORWHITE,LINETHICK3;
AA05:MA(C,5),LINETHICK3,COLORBLUE;
五日乖离率:=(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>30 AND AA05>REF(AA05,1), AA05,DRAWNULL),LINETHICK3,COLORRED;
AA10:MA(C,10);AA20:=MA(C,20);
BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
IF(BB05<0 AND AA05<REF(AA05,1), AA05,DRAWNULL),LINETHICK3,COLORGREEN ;
AA30:MA(C,30);
三拾日乖离率:(C-AA30)/AA30*100,NODRAW;
VAR1:=(AA20-AA30)>REF((AA20-AA30),1) AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);
VAR2:=(AA30-AA20)<REF((AA30-AA20),1) AND AA20<REF(AA20,1) AND AA30<REF(AA30,1);
BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;
IF(BB30>15 AND AA30>REF(AA30,1), AA30,DRAWNULL),LINETHICK3,COLORFF00FF,COLORCYAN;
强势狙击:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);
加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND AA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA10>REF(AA10,1) AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1),10) ;
清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) AND AA05<REF(AA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) AND AA10<REF(AA10,1),10);
DRAWTEXT(加仓 ,LOW*0.98,'←加仓'),COLORRED;
JC:=CROSS(0,五日乖离率) AND 三拾日乖离率<REF(三拾日乖离率,1) AND AA10>REF(AA10,1) ;
减仓:=FILTER(JC,10);
MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<AA30;
买入:=FILTER(MR,10);
DRAWTEXT(减仓,HIGH*1.02,'←减仓'),COLORCYAN;
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;
HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;
HHJSJDB:=(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;
HHJSJDC:=MA(HHJSJDB,5);
QQ1:=MA(MA(CLOSE,3),3);
QQ2:=MA(MA(CLOSE,15),9);
XYSQS1:=(QQ1-REF(QQ1,1))/REF(QQ1,1)*100;
XYSQS2:=(QQ2-REF(QQ2,1))/REF(QQ2,1)*100;
XYSHSL:=EMA(VOL/CAPITAL*100,13);
STICKLINE(XYSQS2>=REF(XYSQS2,1)AND XYSHSL>1,0,40,2,0),COLORYELLOW;
STICKLINE(XYSQS2>=REF(XYSQS2,1)AND XYSHSL>1 AND C>HHJSJDB AND
HHJSJDB>HHJSJDC,41,88,2,0),COLORRED;
IF(XYSQS2>=REF(XYSQS2,1) AND XYSHSL>1,XYSQS1*178,0);
VA1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VA2:=SMA(ABS(LOW-VA1),13,1)/SMA(MAX(LOW-VA1,0),10,1);
VA3:=EMA(VA2,10);
VA4:=LLV(LOW,33);
VA5:=EMA(IF(LOW<=VA4,VA3,0),3);
|