把“DMI捕捉爆涨股”改编为预警指标_股票k线图

将项下公式更改为通达信软件

将项下公式更改为通达信软件

炒股软件

编写条件:

请求老师把下列指标,改编为预警指标,在此谢谢啦. DMI捕捉爆涨股源码 n(1,100,14),m(1,100,6)} input:n(14),m(6); TR0:= SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N); HD := HIGH-REF(HIGH,1);LD := REF(LOW,1)-LOW;DMP:= SUM(IF(HD>0 AND HD>LD,HD, 0),N);DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),N);PDI: DMP*100/TR0;MDI: DMM*100/TR0; ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);ADXR:(ADX+REF(ADX,M))/2; 预警:if(ADX>90 and PDI=0,30,0),coloryellow,linethick2; 买:if(cross(PDI,MDI) and (C >1.05*ref(C,1) or ref(C,1)>1.05*ref(C,2)) and (V>2*ref(V,1) or ref(V,1)>2*ref(V,2))and ma(V,5)>ma(V,60) ,20,0),colorred, linethick2;买2:if(cross(PDI,MDI) and count(预警,10)>=1,10,0),linethick3; 10;90;20 ; 买3:if( cross(PDI,MDI) and cross(PDI,ADX) and cross(PDI,ADXR),30,0);

编写方法:

 M:=6;N:=14;

TR0:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
 HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=SUM(IF(HD>0 AND HD>LD,HD, 0),N);
DMM:=SUM(IF(LD>0 AND LD>HD,LD,0),N);
PDI:=DMP*100/TR0;MDI:= DMM*100/TR0;
 ADX:=MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=(ADX+REF(ADX,M))/2;
 预警:=IF(ADX>90 AND PDI=0,30,0),COLORYELLOW,LINETHICK2;
 买:=IF(CROSS(PDI,MDI)  AND (C >1.05*REF(C,1) OR REF(C,1)>1.05*REF(C,2))
 AND (V>2*REF(V,1) OR REF(V,1)>2*REF(V,2))AND MA(V,5)>MA(V,60) ,20,0),COLORRED, LINETHICK2;
买2:=IF(CROSS(PDI,MDI) AND COUNT(预警,10)>=1,10,0),LINETHICK3,COLORCYAN;  
买3:=IF( CROSS(PDI,MDI) AND CROSS(PDI,ADX) AND CROSS(PDI,ADXR),30,0),COLORWHITE;
XG:买 AND 买2 AND 买3;

{股票资源馆:www.lixiangluntan.com专业和谐高端炒股软件--公式编写交流--加QQ751161480--}

【股票资源馆】让数据触手可得!专业和谐破解高端炒股软件!

是国内最好的股票软件、股票公式指标、股票书籍下载网站;提供最全面的股票知识、炒股教程、黑马股票、股票资讯、期货外汇等给大家在线参考学习。

涨停板选股公式

涨停板选股公式

大智慧策略终端/职业股民首选分析软件:支持ACE数据,支持L2行情全推数据,支持股票池,超赢数据,价格低廉,支持月季费年费。:

下载地址:https://share.weiyun.com/LPoU0GHu