过节了,送大家一个非常实用的、自己组装的主图和附图指标:说一下,主图指标是单阳不破和唐能通的主图组合,另外加了波峰和波谷指标,以及殷保华的318天均线。喜欢的朋友拿去用,不喜勿唧唧歪歪!本身就是拿别人的组合而成,自己感觉实用。附图指标也是组合,主要以MACD为主,加了涨停百分百提示,涨停百分百由于过于严格,出现几率不是太多。有图一目了然,也不用多解释了。
主图指标源码:
MA5:MA(CLOSE,5),COLORWHITE;
MA10:MA(CLOSE,10),COLORYELLOW;
MA20:MA(CLOSE,20),COLORMAGENTA,LINETHICK2;
MA60:MA(CLOSE,60),COLORGREEN,LINETHICK3;
MA120:MA(CLOSE,120),COLORBLUE,LINETHICK3;
MA318:EMA(CLOSE,318),COLORLIMAGENTA,LINETHICK2;
DRAWBAND(MA(CLOSE,60),RGB(155,50,50),MA(CLOSE,120),RGB(83,123,68));
DRAWKLINE(H,O,L,C);
VAR1:=MA(CLOSE,8);
VAR2:=MA(CLOSE,13);
VAR3:=MA(CLOSE,21);
VAR4:=MA(CLOSE,34);
VAR5:=MA(CLOSE,55);
F1:=VAR1>REF(VAR1,1);
F2:=VAR2>REF(VAR2,1);
F3:=VAR2>REF(VAR2,1);
F4:=VAR2>REF(VAR2,1);
F5:=VAR2>REF(VAR2,1);
X1:=EMA(C,8);
DRAWTEXT(FILTER(VAR3 AND VAR2 AND COUNT(X1<REF(X1,1),5)>2 AND X1>REF(X1,1),3),L-0.01,'↑'),COLORFFFFFF;
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1); VB1:=FILTER(A1,10); C1:=BACKSET(VB1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); VB2:=FILTER(A2,10); C2:=BACKSET(VB2,10+1); LD:=FILTER(C2,10);
A:=REF(C,BARSLAST(HD)); B:=REF(C,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
波峰:IF(T1,A,A) ,POINTDOT,COLORYELLOW;
STICKLINE(T1,A,A,5,0),COLORYELLOW,LINETHICK2;
波谷:IF(T2,B,B),POINTDOT,COLOR80FF00;
STICKLINE(T2,B,B,5,0),COLOR80FF00,LINETHICK2;
涨家数:INDEXADV,NODRAW,COLORLIMAGENTA ;
跌家数:INDEXDEC,NODRAW,COLORGREEN;
N:=10;
T3:=CONST(HHVBARS(V,N));
T0:IF(CURRBARSCOUNT<=N+3,CONST(IF(T3=0,C,REF(C,T3))),DRAWNULL),COLORFF00FF;
IF(CURRBARSCOUNT=T3+1,T0,DRAWNULL),CIRCLEDOT,COLORFF00FF;
DRAWTEXT(ISLASTBAR,T0,'量能评台'),COLORCC00CC;
W:=20;
W1:=CONST(REF(HHVBARS(V,W),T3+1)+T3+1);
W0:IF(CURRBARSCOUNT<=T3+W+3 AND CURRBARSCOUNT>=T3+1,CONST(REF(C,W1)),DRAWNULL),COLOR009999;
IF(CURRBARSCOUNT=W1+1,W0,DRAWNULL),CIRCLEDOT,COLOR00CCCC;
M:=10;
Q1:=CONST(REF(HHVBARS(V,M),T3+1)+T3+1);
Q0:IF(CURRBARSCOUNT<=T3+M+3 AND CURRBARSCOUNT>=T3+1,CONST(REF(C,Q1)),DRAWNULL),COLOR009900;
IF(CURRBARSCOUNT=Q1+1,Q0,DRAWNULL),CIRCLEDOT,COLOR00CC00;
BB:=CROSS(H,T0);
STICKLINE(BB,O,C,2,0),COLOR00FFFF;
涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORMAGENTA;
STICKLINE(涨停,H,L,0,0),COLORMAGENTA;
跌停:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORBLUE;
STICKLINE(跌停,H,L,0,1),COLORBLUE;
DRAWICON(CROSS(C,REF(H,3)) AND CROSS(C,REF(H,2)) AND CROSS(C,REF(H,1)),L,1);
阳涨幅:=3.5;
阳倍量:=1.9;
单阳收:=C;
单阳开:=O;
单阳:=单阳收>=REF(C,1)*(1+阳涨幅/100)AND VOL>REF(VOL,1)*阳倍量;
DRAWTEXT(CURRBARSCOUNT<100 AND 单阳,L*0.98,'阳'),COLOR00FFFF;
高不破价:=REF(C,BARSLAST(单阳));
低不破价:=REF(L,BARSLAST(单阳));
单阳不破:=CURRBARSCOUNT<100 AND BARSLAST(单阳)<11 AND (LLV(L,BARSLAST(单阳))>低不破价 OR LLV(L,BARSLAST(单阳))=低不破价);
STICKLINE(单阳不破,低不破价-低不破价*0.0005,低不破价,4,0),COLORGREEN;
STICKLINE(单阳不破,高不破价,高不破价,4,0),COLORRED;
STICKLINE(单阳,单阳开,单阳收,2,0),COLORYELLOW;
DRAWTEXT(BARSLAST(单阳)=1 AND 单阳不破,低不破价*0.98,'1'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=2 AND 单阳不破,低不破价*0.98,'2'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=3 AND 单阳不破,低不破价*0.98,'3'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=4 AND 单阳不破,低不破价*0.98,'4'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=5 AND 单阳不破,低不破价*0.98,'5'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=6 AND 单阳不破,低不破价*0.98,'6'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=7 AND 单阳不破,低不破价*0.98,'7'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=8 AND 单阳不破,低不破价*0.98,'8'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=9 AND 单阳不破,低不破价*0.98,'9'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=10 AND 单阳不破,低不破价*0.98,'10'),COLORGREEN;
附图指标源码:
涨家数:INDEXADV,NODRAW,COLORLIMAGENTA ;
跌家数:INDEXDEC,NODRAW,COLORGREEN;
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA),COLORSTICK;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,0,0),COLORGREEN;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0,0),COLORMAGENTA;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=1,21)=1;
STICKLINE(金叉,0,0.1,5,0),COLOR0000FF;
DRAWTEXT(金叉,-0.095,'金叉'),COLOR0000FF;
二金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二金叉,0,0.15,5,0),COLORLIRED;
DRAWTEXT(二金叉,0.23,'二次金叉'),COLORLIRED;
三金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=3,28)=1;
STICKLINE(三金叉,0,0.2,5,0),COLORLIGREEN;
DRAWTEXT(三金叉,0.28,'三次金叉'),COLORLIGREEN;
四金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=4,28)=1;
STICKLINE(四金叉,0,0.25,5,0),COLORCYAN;
DRAWTEXT(四金叉,0.33,'四次金叉'),COLORCYAN;
五金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=5,33)=1;
STICKLINE(五金叉,0,0.3,5,0),COLORBLUE;
DRAWTEXT(五金叉,0.37,'五次金叉'),COLORBLUE;
六金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=6,33)=1;
STICKLINE(六金叉,0,0.35,5,0),COLORYELLOW;
DRAWTEXT(六金叉,0.0.7,'黄金底'),COLORYELLOW;
DRAWTEXT(六金叉,0.42,'六次金叉'),COLORYELLOW;
七金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=7,33)=1;
STICKLINE(七金叉,0,0.4,5,0),COLORWHITE;
DRAWTEXT(七金叉,0.0.88,'白金底'),COLORWHITE;
DRAWTEXT(七金叉,0.47,'七次金叉'),COLORWHITE;
八金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=8,33)=1;
STICKLINE(八金叉,0,0.5,5,0),COLORMAGENTA;
DRAWTEXT(八金叉,0.0.8,'钻石底'),COLORMAGENTA;
DRAWTEXT(八金叉,0.57,'八次金叉'),COLORMAGENTA;
九金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=9,33)=1;
STICKLINE(九金叉,0,0.55,5,0),COLORRED;
DRAWTEXT(九金叉,0.0.8,'金钻底'),COLORRED;
DRAWTEXT(九金叉,0.6,'九次金叉'),COLORRED;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=(REF(L,A1+1)>L OR REF(C,A1+1)>C) AND (L,DIFF)>REF((L,DIFF),A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,-0.1,5,0),COLORRED;
DRAWTEXT(底背离,DEA,'底背离')COLORRED;
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLOR0000FF,LINETHICK3;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=(REF(C,A2+1)<C OR REF(H,A2+1)<H) AND REF((H,DIFF),A2+1)>(H,DIFF) AND CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK3;
STICKLINE(顶背离,0,0.1,5,0),COLORGREEN;
DRAWTEXT(顶背离,DEA,'顶背离')COLORGREEN;
DRAWTEXT(CROSS(DIFF,DEA) AND 二金叉 AND 底背离,0.3,'三全底'),COLOR0000FF;
IF(DIFF>DEA,DIFF,DRAWNULL),COLORWHITE,LINETHICK2;
IF(DEA>REF(DEA,1) AND DIFF>DEA,DEA,DRAWNULL),COLORYELLOW,LINETHICK2;
{涨停99.99%}
T:=IF((BARSCOUNT(C) > 7),(100)*((MA(C,7))/(LLV(MA(C,7),7)) - 1),1);
N:=IF((T > 0.35),6,65);
W:=((-((100)*(HHV(H,N) - C))/(HHV(HIGH,N) - LLV(L,N))));
RV:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
RG:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
J0:=(HIGH+LOW)/2;
QJ:=EMA(J0,3);
J1:=IF(CLOSE>QJ,VOL,0);
J2:=IF(CLOSE<QJ,VOL,0);
BB:=MA(SUM(J1-J2,22),3);
累加:=21*BB+20*REF(BB,1)+19*REF(BB,2)+18*REF(BB,3)+17*REF( |