DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
{底部信号}
BB值:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3);
AAA:=EMA(CLOSE,12)-EMA(CLOSE,26);
DRAWTEXT(CROSS(BB值,9),0, '‘底部'),COLORYELLOW;
DRAWICON(CROSS(BB值,9),0,41);
STICKLINE(CROSS(BB值,9),AAA,0,2,0),COLORYELLOW;
{DRAWICON(REF(DIF,1)>REF(DIF,2) AND DIF0 AND DIF>DEA,DIF*1.1,2),COLORGREEN;
DRAWICON(CROSS(DEA,DIF) AND DIF>0,DIF,37),COLORGREEN;
DRAWICON(REF(DIF,1)REF(DIF,1) AND DIF<0 AND DIF
X_2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
X_3:=LLVBARS(MACD,X_2+20);
X_4:=IF(X_3>X_2,REF(MACD,X_3),0);
X_5:=MACD<0 AND MACD>X_4 AND LOW=LLV(LOW,X_2+20) AND X_4<0;
X_6:=REF(X_5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,X_3)<0 AND MACD<0;
低背:DRAWLINE(X_4=X_3,MACD,X_6,MACD,0),COLORRED,LINETHICK2;
DRAWICON(X_6,MACD*1.2,26);
X_7:=HHVBARS(MACD,X_2+20);
X_8:=IF(X_7>X_2,REF(MACD,X_7),0);
X_9:=MACD>0 AND MACD
X_10:=REF(X_9,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,X_7)>0;
顶背:DRAWLINE(X_8=X_7,MACD,X_10,MACD,0),COLORGREEN,LINETHICK2;
DRAWICON(X_10,MACD*1.2,15);
X_11:=CLOSE/MA(CLOSE,40)*100<78;
X_12:=CLOSE/MA(CLOSE,60)*100<74;
X_13:=HIGH>LOW*1.051;
X_14:=X_13 AND COUNT(X_13,5)>1;
X_15:=IF(X_14 AND (X_11 OR X_12),2,0);
X_16:=CLOSE/REF(CLOSE,25)<=1.1;
X_17:=SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,2)),7,1)*100<15;
X_18:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
X_19:=SMA(X_18,2,1);
X_20:=SMA(X_19,2,1);
X_21:=IF(X_19>REF(X_19,1) AND REF(X_19,1)
抄底:X_16 AND X_15 AND X_17 AND X_21 ,COLORWHITE;
{X_22:=100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8));
X_23:=MA(CLOSE,5);
X_24:=IF(CLOSE>SAR(10,2,20),1,0);
X_25:=IF(CLOSE
X_27:=IF(X_26>30,1,0);
X_28:=IF(X_26<(-30),(-1),0);
X_29:=X_24+X_27+X_25+X_28;}
{线变色}
{IF(X_29<(-1) OR X_22<25.01,DIF,DRAWNULL),COLORGREEN,LINETHICK1;
IF(X_22>74.989998 OR X_29>0,DIF,DRAWNULL),COLORRED,LINETHICK1;}
VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD) OR (ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1),COLORYELLOW,POINTDOT ;
VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1);
VA4:=CROSS(BACKSET(CROSS(MACD,0) OR (ISLASTBAR AND MACD<0),REF(VA3,1)+2),0.5);
前低:DRAWLINE(VA4,MACD,REF(VA4,1),REF(MACD,1),1),COLORYELLOW,POINTDOT ;