股民大家庭

 找回密码
 立即注册

扫一扫,访问微社区

搜索
查看: 21284|回复: 0
打印 上一主题 下一主题

通达信DMI黄金分割指标公式(源码 贴图)

[复制链接]
跳转到指定楼层
1
发表于 2011-08-24 12:07:30 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 a88528444 于 2011-8-24 12:10 编辑

通达信DMI黄金分割指标公式(源码 贴图)
通达信源码:
N:=14;
M:=6;
ADXP:=1;
TR1:= 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/TR1;
MDI: DMM*100/TR1;
ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:(ADX+REF(ADX,M))/2;
{传统MDI加进四条线 两句话较好}
CD0:20;
CD1:40;
TD0:60;
TD1:80;
DRAWTEXT(CROSS( PDI,CD0), CD0,'●金'),COLORMAGENTA;
DRAWTEXT(CROSS( TD0,PDI), PDI,'●死'),COLORBLUE;
DRAWTEXT(CROSS( ADX,CD0), CD0,'●金'),COLORMAGENTA;
DRAWTEXT(CROSS( TD0,ADX), ADX,'●死'),COLORBLUE;
DRAWTEXT(CROSS( PDI,MDI), MDI,'★金'), COLORYELLOW;
DRAWTEXT(CROSS( MDI,PDI), PDI,'★死'), COLORGREEN;
DRAWTEXT(CROSS( ADX,ADXP), ADXP,'★金'), COLOR000999 ;
DRAWTEXT(CROSS( ADXP,ADX), ADX,'★死'), COLORCYAN;
DRAWTEXT(CURRBARSCOUNT=35,80.1,'梦的海洋友情提示:'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=35,76,'PDI线上穿20介入,下破60急出手 '),COLORBLUE;
DRAWTEXT(CURRBARSCOUNT=35,69.1,'ADX线上穿20介入,下破60急出手'),COLORCYAN;
DRAWTEXT(CURRBARSCOUNT=35,64.1,'如果回调幅度在0.618内属强势调整后市方向不会改变'),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=35,59.1,'如果回调超过在0.618后市方向可能逆转:'),COLORBLUE;
DRAWTEXT(CURRBARSCOUNT=35,54.1,'如果反弹高度在0.382内属反弹行情后市方向不会改变:'),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=35,50,'如果反弹超过在0.382后市方向可能逆转:'),COLORBLUE;

飞狐源码:
{N        14    2   100
M          6    1   100
ADXP       1    1   100}
n:=14;
m:=6;
adxp:=1;
TR1:= 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/TR1;
MDI: DMM*100/TR1;
ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:(ADX+REF(ADX,M))/2;
{传统MDI加进四条线 两句话较好}
CD0:20;
CD1:40;
TD0:60;
TD1:80;
DRAWTEXT(CROSS( PDI,CD0), CD0,'●金'),COLORMAGENTA;
DRAWTEXT(CROSS( TD0,PDI), PDI,'●死'),COLORBLUE;
DRAWTEXT(CROSS( ADX,CD0), CD0,'●金'),COLORMAGENTA;
DRAWTEXT(CROSS( TD0,ADX), ADX,'●死'),COLORBLUE;
DRAWTEXT(CROSS( PDI,MDI), MDI,'★金'), COLORYELLOW;
DRAWTEXT(CROSS( MDI,PDI), PDI,'★死'), COLORGREEN;
DRAWTEXT(CROSS( ADX,ADXP), ADXP,'★金'), COLOR000999 ;
DRAWTEXT(CROSS( ADXP,ADX), ADX,'★死'), COLORCYAN;

DRAWTEXT(BARSCOUNT(CLOSE)=15,80.1,'梦的海洋友情提示:'),COLORYELLOW;
DRAWTEXT(BARSCOUNT(CLOSE)=15,76,'PDI线上穿20介入,下破60急出手 '),COLORBLUE;
DRAWTEXT(BARSCOUNT(CLOSE)=15,69.1,'ADX线上穿20介入,下破60急出手'),COLORCYAN;
DRAWTEXT(BARSCOUNT(CLOSE)=15,64.1,'如果回调幅度在0.618内属强势调整后市方向不会改变'),COLORMAGENTA;
DRAWTEXT(BARSCOUNT(CLOSE)=15,59.1,'如果回调超过在0.618后市方向可能逆转:'),COLORBLUE;
DRAWTEXT(BARSCOUNT(CLOSE)=15,54.1,'如果反弹高度在0.382内属反弹行情后市方向不会改变:'),COLORMAGENTA;
DRAWTEXT(BARSCOUNT(CLOSE)=15,50,'如果反弹超过在0.382后市方向可能逆转:'),,COLORBLUE;





上一篇:通达信柱形乖离率指标公式(源码 幅图 贴图)
下一篇:通达信 买卖点,不是很准的一个指标公式(源码 主图)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

今日股市|网站地图|股民学校|手机版|小黑屋|股民大家庭 |网站地图24小时在线客服

GMT+8, 2025-1-26 15:40 , Processed in 8.511801 second(s), 27 queries , Gzip On.

Powered by 股民大家庭

© 2007-2019 www.gupiao168.com


快速回复 返回顶部 返回列表