自用macd彩色版(源码 副图 贴图)介绍
自用macd彩色版(源码 副图 贴图)
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26),LINETHICK1;
DEA:EMA(DIFF,9),LINETHICK1;
MACD1:=2*(DIFF-DEA),STICK;
STICKLINE(MACD1>=REF(MACD1,1) AND MACD1>0,0,MACD1,1,0),COLORRED;
STICKLINE(MACD1>=REF(MACD1,1) AND MACD1<0,0,MACD1,1,0),COLORRED;
STICKLINE(MACD1<REF(MACD1,1),0,MACD1,1,0),COLORGREEN;
MACD:MACD1,NODRAW,COLORMAGENTA;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(二次金叉,DEA*1.04,13) ;
A0:=CROSS(DIFF,DEA);
A:=A0 AND DIFF<0;
FT:=BARSLAST(A);
B:=COUNT(A0,FT);
零上二次金叉:=DIFF>0 AND DEA>0 AND A0 AND B<2;
DRAWICON(零上二次金叉,DEA*1.04,13) ;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
MACD底背:=IF(B1>0,-0.1,0),COLORRED,POINTDOT;
KDJ底背:=IF(B2>0,-0.1,0),COLORFF00FF,POINTDOT;
RSI底背:=IF(B3>0,-0.1,0),COLORYELLOW,POINTDOT;
MACD顶背:=IF(D1>0,0.1,0),COLOR00FF00,POINTDOT;
KDJ顶背:=IF(D2>0,0.1,0),COLORFFCC66,POINTDOT;
RSI顶背:=IF(D3>0,0.1,0),COLORWHITE,POINTDOT;
STICKLINE(B1>0,-0.3*HHV((ABS(MACD)),180),0,3,0),COLORRED;
STICKLINE(B2>0,-0.2*HHV((ABS(MACD)),180),0,3,0),COLORFF00FF;
STICKLINE(B3>0,-0.1*HHV((ABS(MACD)),180),0,3,0),COLORYELLOW;
STICKLINE(D1>0,0.3*HHV((ABS(MACD)),180),0,3,0),COLOR00FF00;
STICKLINE(D2>0,0.2*HHV((ABS(MACD)),180),0,3,0),COLORFFCC66;
STICKLINE(D3>0,0.1*HHV((ABS(MACD)),180),0,3,0),COLORWHITE;
VAR01:=((CLOSE - LLV(LOW,30))/(HHV(HIGH,30) - LLV(LOW,30)))*(100);
VAR02:=SMA(VAR01,2,1);
VAR03:=SMA(VAR02,2,1);
VAR04:=((VOL)/(CAPITAL))*(34);
VAR05:=REF(VAR04,1);
主力建仓提醒:=((VAR03 < 8.5) AND (VAR02 < 11))*HHV((ABS(MACD)),30) ,STICK,LINETHICK1,COLORFF00FF;
大户减仓:((VAR05 > 50) AND (VAR05 < 4.2))*HHV((ABS(MACD)),30),STICK,LINETHICK1,COLOR00FF00;
机构出货:((VAR03 > 89.5) AND (VAR02 > 91))*HHV((ABS(MACD)),30),STICK,LINETHICK1,COLORFFFFFF;
主力出货1:((VAR03 > 88.5) AND (VAR02 > 94.6))*HHV((ABS(MACD)),30),STICK,LINETHICK1,COLORFFFF00;
A10:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A10+1)>CLOSE AND DIFF>REF(DIFF,A10+1) AND CROSS(DIFF,DEA);
DEA0:=EMA(DIFF*100,9);
MACD0:=2*(DIFF*100-DEA0);
黑马:=(MACD0>REF(MACD0,1)*2.5 AND MACD0>15);
XG必涨:(底背离 AND 黑马)*HHV((ABS(MACD)),30),LINETHICK2,COLORMAGENTA;
gd16200