KDJ两次金叉的选股指标
2015-8-15 11:21:00点击:
编写要求:
1、MACD<0、且DIF>0; 2、期间KDJ出现过两次金叉、其中: 信号1、第一次金叉时、D值<50; 信号2、其后J值>100; 信号3、随后J值<50; 信号4、之后第二次金叉;
解答:
N:=9;M1:=3;M2:=3;
RSV2:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K2:=SMA(RSV2,M1,1);
D2:=SMA(K2,M2,1);
J2:=3*K2-2*D2;
T:=BARSLAST(CROSS(K2,D2))<=25;
股:=CROSS(K2,D2); {之后第二次金叉}
海:=REF(BARSLAST(股),1)+1;
煤:=REF(D2,海)<68; {第一次金叉时、D值<68}
楚天:=REF(HHV(J2,海+1),1)>=87; {其后J值=87}
老张:=REF(LLV(J2,海-1),1)<50; {随后J值<50}
XG:REF(CROSS(K2,D2),T-1) AND 股 AND 煤 AND 楚天 AND 老张 AND "MACD.MACD"<0 AND "MACD.DIF">0;
- 上一篇:J值上穿KD的预警指标 2015/8/15
- 下一篇:CCI合并KDJ的选股指标 2015/8/15