编写KDJ和DMI选股公式
-
相关简介:编写要求: www.guhai.com.cn 股海网解答: 网友求助: 求助老师编写KDJ和DMI选股公式! 条件:1、KDJ金叉 2、DMI里的ADX大于60 解答如下: ==================== {同时满足} RSV=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; a=SMA(RSV,3,1); b=SMA(a,3,1); e=3*a-2*b; 金叉:=CROSS(e,b); TR := SMA(MAX(MAX(HIGH-
-
文章来源:股海网作者:股海网发布时间:2015-07-12浏览次数:
编写要求:
www.guhai.com.cn股海网解答:
网友求助:
求助老师编写KDJ和DMI选股公式!
条件:1、KDJ金叉
2、DMI里的ADX大于60
解答如下:
====================
{同时满足}
RSV=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
a=SMA(RSV,3,1);
b=SMA(a,3,1);
e=3*a-2*b;
金叉:=CROSS(e,b);
TR := SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14,1);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SMA(IF(HD>0 AND HD>LD,HD,0),14,1);
DMM:= SMA(IF(LD>0 AND LD>HD,LD,0),14,1);
PDI:=DMP*100/TR;
MDI:=DMM*100/TR;
ADX:=SMA(ABS(MDI-PDI)/(MDI+PDI)*100,14,1)>60;
金叉 AND ADX;
{同时满足}
RSV=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
a=SMA(RSV,3,1);
b=SMA(a,3,1);
e=3*a-2*b;
金叉:=CROSS(e,b);
TR := SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14,1);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SMA(IF(HD>0 AND HD>LD,HD,0),14,1);
DMM:= SMA(IF(LD>0 AND LD>HD,LD,0),14,1);
PDI:=DMP*100/TR;
MDI:=DMM*100/TR;
ADX:=SMA(ABS(MDI-PDI)/(MDI+PDI)*100,14,1)>60;
金叉 AND ADX;
上一篇:涨幅小于0的编写方法
下一篇:把“极品买点”中第一次出现B点时改成选股