DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
MACD2:=EMA(MACD,2);
MM1:=IF(MACD< 0,MACD,0);
JJ1:=MM1> REF(MM1,1);
ZZ1:=REF(JJ1,1)=1;
抄底区:(JJ1 AND ZZ1)*DEA,POINTDOT,COLORRED;{MACD蓝柱缩短---指今日比昨天短}
STICKLINE(抄底区=DEA,DEA,DIF,3,0),COLORRED;
DIFF:=EMA(CLOSE,26) - EMA(CLOSE,12);
DEAF:=EMA(DIFF,9);
MACDF:=2*(DIFF-DEAF), COLORSTICK,COLOR5454FF;
MM:=IF(MACDF< 0,MACDF,0);
JJ:=MM> REF(MM,1);
ZZ:=REF(JJ,1)=1;
逃顶区:(JJ AND ZZ)*DEAF,POINTDOT,COLORRED;{MACD蓝柱缩短---指今日比昨天短}
STICKLINE(逃顶区=DEAF,DEA,DIF,3,0),COLORGREEN;
STICKLINE(MACD>MACD2 AND MACD>0,0,MACD,0.1,0),COLORRED;
STICKLINE(MACD>MACD2 AND MACD<0,0,MACD,0.1,0),COLORLIGRAY;
STICKLINE(MACD
STICKLINE(MACD>=0 OR MACD<=0,0,0,50,1),COLORGREEN;
VARX1:=LLV(DEA,25);
VARX3:=DEA-(DIF-DEA);
压力线:REF(HHV(DIF,25),1),COLORGREEN;
支撑线:IF(DIF
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
A11:=BARSLAST(REF(CROSS(DIF,DEA),1));
M底背:=REF(CLOSE,A11+1)>CLOSE AND DIF>REF(DIF,A11+1) AND CROSS(DIF,DEA),COLORLIGRAY;
STICKLINE(M底背,DIF,支撑线,2,0),COLORYELLOW;
DRAWTEXT(M底背,DIF,' M底背'),COLORYELLOW;
GJ:=MAX(C,O);
H4:=HHV(GJ,4);
GT2:=DEAREF(DEA,2);
A2T:=BARSLAST(REF(GT2,1));
顶背离:=REF(H4,A2T+1)
STICKLINE(顶背离,压力线,DIF,2,0),COLORGREEN;
DRAWTEXT(顶背离,REF(DEA,A2)*0.5,' 顶背离'),COLORGREEN;
XGS:=CROSS(压力线,DIF);
DRAWICON(XGS,压力线,2);
XGD:=CROSS(DIF,支撑线);
DRAWICON(XGD,支撑线,1);
XG1:=CROSS(DIF,DEA);
DRAWICON(XG1,DEA,11);
XG3:=CROSS(DEA,DIF);
DRAWICON(XG3,DIF,12);
抄底:=XGS AND XG1;
DRAWTEXT(抄底,DIF,' 底'),COLORWHITE;
获利%:WINNER(CLOSE)*100,NODRAW,COLORWHITE;
N1:=STRCAT(CON2STR(YEAR,0),' 年 ');
Y1:=STRCAT(CON2STR(MONTH,0),' 月 ');
R:=STRCAT(CON2STR(DAY,0),' 日 ');
SJ:=STRCAT(STRCAT(N1,Y1), R);
DRAWTEXT_FIX(C>0,0.05,0,0,SJ);
DRAWTEXT_FIX(C>0,0.15,0,0,'作者 云顶山人'),COLORYELLOW;
月DI:="MACD.DIF#MONTH"COLOR0080FF;
月DE:="MACD.DEA#MONTH",COLOR0080FF,LINETHICK2;
周DI:="MACD.DIF#WEEK"COLORRED;
周DE:="MACD.DEA#WEEK",COLORRED,LINETHICK2;
日DI:="MACD.DIF",COLORWHITE;
日DE:="MACD.DEA",COLORWHITE,LINETHICK2;
日金叉:=CROSS(日DI,日DE);
周金叉:=CROSS(周DI,周DE);
月金叉:=CROSS(月DI,月DE);
M周金叉:IF(CROSS(周DI,周DE),MACD+0.1,0),COLORWHITE,LINETHICK2;
M日周月金叉共振:IF((日DI>日DE AND 周DI>周DE AND 月金叉) OR ( 周DI>周DE AND 月DI>月DE AND 日金叉)
OR (月DI>月DE AND 日DI>日DE AND 周金叉) OR (日金叉 AND 周金叉 AND 月金叉),MACD+0.2,0),COLORF00FF0,LINETHICK2;
VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);
VOLUME1:=CURRBARSCOUNT=1 AND PERIOD=5,VVOL;
VOLUME:=VOL;
V3:=VOLUME1>=REF(VOLUME,1)*1.5;
XGY:=C>OPEN AND VOLUME1 AND VOLUME AND V3;
虚拟成交量:=XGY=1;
即时虚拟量:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL/FROMOPEN*240,DRAWNULL);
成交量:=IF(CURRBARSCOUNT>1,VOL,即时虚拟量);
五日均量:=MA(VOL,5);
预警:=虚拟成交量 OR (成交量>=五日均量*2 AND (L-O)/O*100>=-1);
STICKLINE(预警,XGY*0.3,0,-1,-1),COLOR00C0C0;