没什么可解释的 对照股价 看看效果怎么样 下面是系统自带的MACD
这样 叠加进主图后 可以很直观的看清股价目前的强弱
所以 零轴以上操作 零轴以下 最好清仓观望
源码如下:(通达信)
VAR1:=(C+H+O+L)/4;
卖:XMA(VAR1,20)*1.08,COLORMAGENTA,LINETHICK1;
买:XMA(VAR1,32)*0.9,COLORMAGENTA,LINETHICK1;
高1:=REF(HHV(H,150),3);
低1:=REF(LLV(L,150),3);
H3:=(高1+低1)*0.5;
中轴:REFDATE(H3,DATE),COLORWHITE,LINETHICK1;
T:HHV(H,60) ,LINETHICK1,COLORYELLOW;
T1:2*中轴-HHV(H,60),LINETHICK1,COLORYELLOW;
高:HHV(H,120) ,LINETHICK1,COLORGREEN;
低:2*中轴-HHV(H,120),LINETHICK1,COLORGREEN;
B1:=EMA(C,12);
B2:=EMA(C,26);
B3:=B1-B2;
WDIF:EMA(EMA(EMA(C,3),3),3)+B3;
WDEA:EMA(WDIF,9);
MACD:=2*(WDIF-WDEA);
STICKLINE(MACD>0,中轴,中轴+MACD,0,-1),COLORRED;
STICKLINE(MACD<0,中轴,中轴+MACD,0,-1),COLORLIBLUE;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,中轴,中轴+MACD,0,-1 ),COLOR00BBFF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,中轴,中轴+MACD,0,-1 ),COLOR0011BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,中轴,中轴+MACD,0,-1),COLORBB11BB;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,中轴,中轴+MACD,0,-1),COLORGREEN;
DRAWBAND(WDIF,RGB(155,50,50),EMA(WDIF,9),RGB(0,50,150));
STICKLINE(C>O,H,L,0,0),COLORRED;
STICKLINE(C>O,C,O,3.1,1),COLORRED;
STICKLINE(C<=O,H,L,0,0),COLORCYAN;
STICKLINE(C<=O,C,O,3.1,1),COLORCYAN;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
DRAWTEXT(((LLV(LOW,21)=LOW) AND MA(CCI,1)>=REF(MA(CCI,1),1)
AND NOT((LLV(CCI,21)=CCI))),L*0.988,'背'),COLORMAGENTA;
DRAWTEXT(((HHV(HIGH,34)=HIGH) AND (MA(CCI,3)<REF(MA(CCI,3),1)OR CCI<REF(CCI,1)) AND
NOT((HHV(CCI,34)=CCI))),H*1.015,'背'),COLORGREEN;
VAR5:=EMA(MA(CLOSE,3),34);
VAR11:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)-
3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1);
CC:=CROSS(VAR11,8);
DRAWTEXT(CC AND WDIF>REF(WDIF,1),L*0.994,'买'),COLOR0099FF;
STICKLINE(CROSS(VAR11,8) ,OPEN,CLOSE,2,0),COLORBB11BB;
VARA:=LLV(LOW,36);
VARB:=HHV(HIGH,30);
VARC:=EMA((CLOSE-VARA)/(VARB-VARA)*4,4)*25;
趋势:= VARC, COLOR33FFFF;
顶背: STICKLINE(VARC>90,OPEN,CLOSE,1,0),COLORRED;
VAR26:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
VAR27:=MA(VAR26,5);
VAR28:=MA(VAR26,10);
DRAWTEXT(CROSS(VAR26,VAR27) AND VAR27<VAR28,L*0.995,'上'),COLORYELLOW;
STICKLINE(CROSS(VAR26,VAR27) AND VAR27<VAR28,OPEN,CLOSE,1,0),COLORYELLOW;
DRAWTEXT(CROSS(VAR27,VAR26) AND VAR27>VAR28,H*1.008,'下'),COLORWHITE;
STICKLINE(CROSS(VAR27,VAR26) AND VAR27>VAR28,OPEN,CLOSE,1,0),COLORGREEN;
MA60:=MA(C,60),COLORCYAN;
DRAWICON(CROSS(卖,MA60),MA60,1),COLORRED;
DRAWICON(CROSS(MA60,卖),MA60,2),COLORGREEN;
|