MACD买入点提示
SHORT:=12;LONG:=26;MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
DRAWICON(REF(DIF,1)<REF(DIF,2) AND DIF>REF(DIF,1) AND DIF<0 AND DIF<DEA,DIF*1.1,1),COLORRED;
VAR2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
VAR3:=LLVBARS(MACD,VAR2+20);
VAR4:=IF(VAR3>VAR2,REF(MACD,VAR3),0);
VAR5:=MACD<0 AND MACD>VAR4 AND LOW=LLV(LOW,VAR2+20) AND VAR4<0;
VAR6:=REF(VAR5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,VAR3)<0 AND MACD<0;
底背:DRAWLINE(VAR4=VAR3,MACD,VAR6,MACD,0),COLORRED,DOTLINE;
DRAWICON(VAR6,MACD*1.2,9);
VAR7:=HHVBARS(MACD,VAR2+20);
VAR8:=IF(VAR7>VAR2,REF(MACD,VAR7),0);
VAR9:=MACD>0 AND MACD<VAR8 AND HIGH=HHV(HIGH,VAR2+20) AND VAR8>0;
VAR10:=REF(VAR9,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,VAR7)>0;
顶背:DRAWLINE(VAR8=VAR7,MACD,VAR10,MACD,0),COLOR1D7300,DOTLINE;
DRAWICON(VAR10,MACD*1.2,15);
VAR11:=CLOSE/MA(CLOSE,40)*100<78;
VAR12:=CLOSE/MA(CLOSE,60)*100<74;
VAR13:=HIGH>LOW*1.051;
VAR14:=VAR13 AND COUNT(VAR13,5)>1;
VAR15:=IF(VAR14 AND (VAR11 OR VAR12),2,0);
VAR16:=CLOSE/REF(CLOSE,25)<=1.1;
VAR17:=SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,2)),7,1)*100<15;
VAR18:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
VAR19:=SMA(VAR18,2,1);
VAR20:=SMA(VAR19,2,1);
VAR21:=IF(VAR19>REF(VAR19,1) AND REF(VAR19,1)<REF(VAR19,2) AND VAR19<23,1.5,0);
VAR22:=100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8));
VAR23:=MA(CLOSE,5);
VAR24:=IF(CLOSE>SAR(10,2,20),1,0);
VAR25:=IF(CLOSE<SAR(10,2,20),(-1),0);
VAR26:=ATAN((VAR23/REF(VAR23,1)-1)*100)*180/3.1416;
VAR27:=IF(VAR26>30,1,0);
VAR28:=IF(VAR26<(-30),(-1),0);
VAR29:=VAR24+VAR27+VAR25+VAR28;
IF(VAR29<(-1) OR VAR22<25.01,DIF,DRAWNULL),COLOR1D7300;
IF(VAR22>74.989998 OR VAR29>0,DIF,DRAWNULL),COLORRED;