软件名称:[B]综合而成的实用RSI公式 趋势DMI公式[/B]
软件类型:国产软件
运行环境:Win2000/WinXP/Win2003/WinVista
软件语言:简体中文
授权方式:共享软件
软件大小:5.00 KB
官方主页:Home Page
更新时间:2010-04-29 07:11:36
软件简介:
借鉴红树林园老师的“RSI 复合通道”和网上“奥斯咔”公式,加上自己理解修改类似于macd。用法:多空、强弱研判见20、0、-20,买卖见两条线相交点的“活跃度”是上还是下。另加入量能饱和度指标,在0线上显示,结合趋势判断起点和高点。另附上“趋势DMI”公式,两者结合效果更好。注:我用的是白色背景,眼睛比较舒服,如不喜,可调整公式中相关颜色。不会贴图,请感兴趣的朋友代为贴上。向红树林园老师致敬,向论坛致谢!
1、实用RSI
{坐标背景}
DRAWBAND(-50,RGB(0,0,0),50,RGB(230,230,230));{该行设置背景色};
DRAWBAND(-25,RGB(0,0,0),25,RGB(210,210,210));{该行设置背景色}
{正文}
LC:=REF(CLOSE,1);
RS1:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100-50;
WR10:=100*(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))-50;
TR:=MAX(MAX((RS1-RS1),ABS(REF(RS1,1)-RS1)),ABS(REF(RS1,1)-RS1));
MD:=MA(RS1,6),COLOR0000FF,NODRAW;
DRAWBAND(RS1,RGB(132,189,168),MD,RGB(228,202,199));
DRAWBAND(MD,RGB(132,189,168),RS1,RGB(228,202,199));
0,COLORWHITE;
STICKLINE(-25,-25,-25,5,1),COLORWHITE;
STICKLINE(25,25,25,5,1),COLORWHITE;
RSI:RS1,COLORLIRED;
MR:MD,COLORGRAY,LINETHICK1;
IF(MR>REF(MR,1) OR RSI>MR,MR,DRAWNULL),COLORRED,LINETHICK1;
活跃:=(RS1-WR10)/4,NODRAW;
饱和:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);
STICKLINE(活跃>0,0,活跃,0,1),COLORFF00FF;
STICKLINE(活跃<0,0,活跃,0,1),COLORBROWN;
STICKLINE(活跃>17 AND 活跃<19.5,0,活跃,0,1)COLOR858500;
STICKLINE(活跃>19.5,0,活跃,0,1),COLORBLUE;
活跃度:活跃,COLORLIMAGENTA,NODRAW;
饱和度:饱和,COLORBLACK,NODRAW;
STICKLINE(饱和度=100,0,-2,2,1),COLORLIBLUE;
{图示}
VM:=MA(RS1,5),COLORFF00FF,NODRAW;
DRAWTEXT(ISLASTBAR AND RSI>REF(RSI,1),0,' ▲'),COLORDD00FF;
DRAWTEXT(ISLASTBAR AND RSI<REF(RSI,1),0,' ▼'),COLORBLUE;
2、趋势DMI
{坐标背景}
DRAWBAND(0,RGB(0,0,0),15,RGB(230,230,230));{该行设置背景色};
DRAWBAND(15,RGB(0,0,0),70,RGB(210,210,210));{该行设置背景色}
DRAWBAND(70,RGB(0,0,0),85,RGB(230,230,230));{该行设置背景色};
{公式内容}
TR:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),14);
DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),14);
DRAWBAND(DMM*100/TR,RGB(132,189,168),DMP*100/TR,RGB(228,202,199));
STICKLINE(15,15,15,5,1),COLORWHITE;
STICKLINE(30,30,30,5,1),COLORWHITE;
STICKLINE(50,50,50,5,1),COLORWHITE;
STICKLINE(70,70,70,5,1),COLORWHITE;
PDI:DMP*100/TR,COLORLIRED;
MDI:DMM*100/TR,COLORGRAY;
ADX:EMA(ABS(MDI-PDI)/(MDI+PDI)*100,6),COLORLIMAGENTA;
ADXR:EMA(ADX,6),COLORBLACK;
{图示}
DRAWTEXT(ISLASTBAR AND PDI>REF(PDI,1),50,'▲'),COLORDD00FF;
DRAWTEXT(ISLASTBAR AND PDI<REF(PDI,1),50,'▼'),COLORBLUE;
[url=http://www.70822.com/soft/sort013/sort05/down-19453.html]综合而成的实用RSI公式 趋势DMI公式[/url]