指标可以通过但是无法展现出来
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,0),COLORRED;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORRED;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,1,1),COLORA8A8A8;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORGREEN;
VAR1:=99999999999;
VAR2:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
VAR3:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
VAR4:=SMA(VAR3,13,8);
阳: SMA(VAR4,13,8),COLORRED;
阴: SMA(VAR2,21,8),COLOR00FF00;
减:90,COLORCYAN,LINETHICK2, POINTDOT;
加:0, ,COLORFF00FF,LINETHICK2, POINTDOT;
分水岭: 45,COLORYELLOW, POINTDOT;
A:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19);
B:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));
D:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4);
阴阳线:A+100,COLORBLUE;
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26), LINETHICK1;
DEA:EMA(DIFF,9), LINETHICK1;
MACD:=2*(DIFF-DEA),COLORSTICK LINETHICK1;
DEA1:=EMA(DIFF,9)*DEA/30,NODRAW;
DIF1:=EMA(CLOSE,5) - EMA(CLOSE,10),NODRAW;
DEA2:=EMA(DIFF,5),COLORGRAY,NODRAW;
MACD2:=EMA(MACD,3);
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,1,0),COLORRED;
STICKLINE(MACD>=0 AND MACD<=REF(MACD,1),0,MACD,1,0),COLORGREEN;
STICKLINE(MACD<=0 AND MACD>=REF(MACD,1),0,MACD,1,0),COLORFF00FF;
STICKLINE(MACD<=0 AND MACD<=REF(MACD,1),0,MACD,1,0),COLOR00FFFF;
这个是华丽一点的macd那位高手帮我改写下,选择通达信原版macd源码最好~!!!
合并后:
DIF:(EMA(CLOSE,12)-EMA(CLOSE,26))*6;
DEA:EMA(DIF,9)*6;
MACD:(DIF-DEA)*2,COLORSTICK;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,0),COLORRED;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORRED;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,1,1),COLORA8A8A8;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORGREEN;
VAR1:=99999999999;
VAR2:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
VAR3:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
VAR4:=SMA(VAR3,13,8);
阳: SMA(VAR4,13,8),COLORRED;
阴: SMA(VAR2,21,8),COLOR00FF00;
减:90,COLORCYAN,LINETHICK2, POINTDOT;
加:0, ,COLORFF00FF,LINETHICK2, POINTDOT;
分水岭: 45,COLORYELLOW, POINTDOT;
A:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19);
B:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));
D:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4);
阴阳线:A+100,COLORBLUE;
|