以下是通达信MACD组合(副)源码
1.指标>80 时,回档机率大;指标<20时,反弹机率大;
2.K在20左右向上交叉D时,视为买进信号;
3.K在80左右向下交叉D时,视为卖出信号;
4.J>100 时,股价易反转下跌;J<0 时,股价易反转上涨;
5.KDJ 波动于50左右的任何信号,其作用不大。
参数,跟原系统macd参数一样
SJ:=1;
DIF:(EMA(CLOSE,SHORT)-EMA(CLOSE,LONG))*150,LINETHICK2;
DEA:EMA(DIF,MID)*SJ;
DRAWBAND(DIF,RGB(220,160,30),DEA,RGB(60,70,90));
MACD:(DIF-DEA)*2,COLORSTICK,LINETHICK2;
STICKLINE(MACD<REF(MACD,1) AND DIF>0,0,MACD,1,0),COLORBLUE;
STICKLINE(MACD>REF(MACD,1) AND DIF>0,0,MACD,1,0),COLORRED;
STICKLINE(MACD<REF(MACD,1) AND DIF<0,0,MACD,1,0),COLORLIGREEN;
STICKLINE(MACD>REF(MACD,1) AND DIF<0,0,MACD,1,0),COLORLIMAGENTA;
{KDJ}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),COLORBROWN;
D:=SMA(K,3,1);
J:3*K-2*D,COLORRED;
RSI:SMA(MAX(CLOSE-REF(C,1),0),24,1)/SMA(ABS(CLOSE-REF(C,1)),24,1)*100,COLORLIBLUE;
IF(RSI>40,RSI,DRAWNULL),COLORLIRED;
100,COLORGREEN;
80;
20;
0;