DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));
DEA:=EMA(DIFF,9);
MACD:2*(DIFF-DEA),COLORSTICK;
M开口值:=IF((DIFF-REF(DIFF,1))>0.04 AND DEA>REF(DEA,1) AND (DIFF-DEA)>0,(DIFF-DEA)*0.3,0);
连升天数:LAST(M开口值)/10,COLORYELLOW;
升天:连升天数*10,PRECIS0,COLOR00FFFF,LINETHICK0;
CC:=IF(C>MA(C,15) AND DIFF>=DEA ,DIFF,0);
红:LAST(CC),PRECIS0,COLORRED,LINETHICK0;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
周K:=MA("KDJ.K#WEEK"(9,3,3) ,5);
周D:=MA("KDJ.D#WEEK"(9,3,3) ,5);
周J:=MA("KDJ.J#WEEK"(9,3,3) ,5);
DRAWICON(K<20 AND CROSS(K,D),MACD,1);
DRAWTEXT(CROSS("KDJ.K#WEEK"(9,3,3),"KDJ.D#WEEK"(9,3,3)) ,MACD*1.5,'周买'),COLORRED;
BB:IF( CROSS("KDJ.K#WEEK"(9,3,3),"KDJ.D#WEEK"(9,3,3)) ,1,0),PRECIS0,LINETHICK0;
DRAWTEXT(CROSS("KDJ.D#WEEK"(9,3,3),"KDJ.K#WEEK"(9,3,3)) ,MACD*1.5,'▼'),ALIGN2,COLORGREEN;
DRAWTEXT(CROSS("KDJ.K#MONTH"(9,3,3),"KDJ.D#MONTH"(9,3,3)) ,MACD*1.5,'月买'),COLORMAGENTA;
CC:IF(CROSS("KDJ.K#MONTH"(9,3,3),"KDJ.D#MONTH"(9,3,3)) ,1,0),PRECIS0,COLORWHITE,LINETHICK0;
DRAWTEXT(CROSS("KDJ.D#MONTH"(9,3,3),"KDJ.K#MONTH"(9,3,3)) ,MACD*1.5,'▼'),ALIGN2,COLORYELLOW;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,6,0 ),COLOR00AA00;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,4.6,0 ),COLOR00BB11;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,4.4,0 ),COLOR00CC22;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,3.3,0 ),COLOR00DD33;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2.2,0 ),COLOR00EE44;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.1,0 ),COLOR00FF55;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,6 ,0 ),COLOR0000AA;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,4.6 ,0 ),COLOR0011BB;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,4.4,0 ),COLOR0022CC;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,3.3 ,0 ),COLOR0033DD;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.2 ,0 ),COLOR0044EE;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.1 ,0 ),COLOR0055FF;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,6,0 ),COLORAA00BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,4.6 ,0 ),COLORBB11BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,4.4,0 ),COLORCC22BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,3.3,0 ),COLORDD33BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2.2 ,0 ),COLOREE44BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1.1 ,0 ),COLORFF55BB;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,6,0 ),COLORFFAA00;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,4.6 ,0 ),COLORFFBB11;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,4.4,0 ),COLORFFCC22;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,3.3 ,0 ),COLORFFDD33;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2.2 ,0 ),COLORFFEE44;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1.1 ,0 ),COLORFFFF55;
DIFF:(EMA(CLOSE,12) - EMA(CLOSE,26)),COLORWHITE;
DEA:EMA(DIFF,9),COLORWHITE;
PARTLINE(DEA,C>MA(C,15) AND DIFF>=DEA ,RGB(255,0,255)),LINETHICK2;
PARTLINE(DIFF,C>MA(C,15) AND DIFF>=DEA ,RGB(255,0,0)),LINETHICK2;
PARTLINE(DEA,C<MA(C,15),RGB(0,255,0)),LINETHICK2;
PARTLINE(DIFF,C<MA(C,15),RGB(0,255,0)),LINETHICK2;
DRAWTEXT(CROSS(DIFF,DEA),DIFF-0,'建仓'),COLORRED;
持仓段:0,COLOR00CFFF;
空仓段:0,COLORFFCCFF;
STICKLINE(DIFF>DEA,-0.5,-0.6,10,1),COLOR00CFFF;
STICKLINE(DIFF<DEA,-0.5,-0.6,10,1),COLORFFCCFF;
|