股票论坛

标题: 请老师帮忙修改一下预警公式,感谢!! [打印本页]

作者: 上官阳荣    时间: 2016-12-16 17:52
标题: 请老师帮忙修改一下预警公式,感谢!!
选股公式有错误请老师帮忙修改一下预警公式   谢谢~~

N:=14;
M:=6;
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:= DMP*100/TR;
MDI:=DMM*100/TR;
ADX:= EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=EXPMEMA(ADX,M);
ZT:= PDI< MDI AND PDI< ADX AND PDI< ADXR;
CROSS(PDI, MDI) AND CROSS(PDI, ADX) AND CROSS(PDI, ADXR) AND C/REF(C,1)>=1.05 AND VOL>=HHV(V,13) AND LAST (ZT,7,1);

错误句 :
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N)
详细信息 : 变量 TR 与函数名重复!
错误起始位置 : 15 ; 长度: 2

作者: 项天宝    时间: 2016-12-16 17:52
变量 TR 与函数名重复!
N:=14;
M:=6;
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
变量 TR 随意换个名 如:TT  ,   AA,  BB
作者: 远方客    时间: 2016-12-17 11:07
N:=14;
M:=6;
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:= DMP*100/TR;
MDI:=DMM*100/TR;
ADX:= EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=EXPMEMA(ADX,M);
ZT:= PDI< MDI AND PDI< ADX AND PDI< ADXR;
CROSS(PDI, MDI) AND CROSS(PDI, ADX) AND CROSS(PDI, ADXR) AND C/REF(C,1)>=1.05 AND VOL>=HHV(V,13) AND LAST (ZT,7,1);

可以选股,预警了。指标信号不多,但较准确。
作者: 远方客    时间: 2016-12-17 11:08
N:=14;
M:=6;
TRR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:= DMP*100/TRR;
MDI:=DMM*100/TRR;
ADX:= EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=EXPMEMA(ADX,M);
ZT:= PDI< MDI AND PDI< ADX AND PDI< ADXR;
CROSS(PDI, MDI) AND CROSS(PDI, ADX) AND CROSS(PDI, ADXR) AND C/REF(C,1)>=1.05 AND VOL>=HHV(V,13) AND LAST (ZT,7,1);

帖错了,是这个




欢迎光临 股票论坛 (http://100000w.com/) Powered by Discuz! X3.2