手机端
当前位置:爱约股 > 公式技巧 > 编写KDJ和DMI选股公式

编写KDJ和DMI选股公式

====================
{同时满足}
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;

分享至:

相关推荐