DDE的四个公式
指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2011-01-22 16:54:00
公式简介:
网上搜集到有关DDE的四个公式,稍加修改,仅供大家参考。
一、源码:
{DDX 大单动向}
N:=20;JJ:=(HIGH+LOW+CLOSE)/3;QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDX:((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,1000000,10000),COLORRED ;
DX:=MA(DDX,5)*N;
STICKLINE(DDX>0,0,DDX,3,0),COLOR000088;
STICKLINE(DDX>0,0,DDX,2.5,0),COLOR0000AA;
STICKLINE(DDX>0,0,DDX,1.5,0),COLOR0000CC;
STICKLINE(DDX>0,0,DDX,1,0),COLOR0000EE;
STICKLINE(DDX<0,0,DDX,3,0),COLOR008800;
STICKLINE(DDX<0,0,DDX,2.5,0),COLOR00AA00;
STICKLINE(DDX<0,0,DDX,1.5,0),COLOR00CC00;
STICKLINE(DDX<0,0,DDX,1,0),COLOR00EE00;
DDX1:SMA(DX,3,1),COLORWHITE;
DDX2:SMA(DDX1,3,1),COLORYELLOW;
DDX3:EMA(DDX2,5),COLORFF00FF;
预警:DDX>0 AND MA(V,5)>MA(MA(V,5),5) AND CROSS(DDX1,DDX2),LINETHICK;
天:=COUNT(DDX>0,5),COLORRED;
DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK3,COLOR00FFFF;
{DDY 涨跌动因}
N:=22;JJ:=(HIGH+LOW+CLOSE)/3;QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDY:((QJ2+QJ4)-(QJ1+QJ3))/IF(CAPITAL=0,1000000,10000),COLORRED;
DY:=MA(DDY,5)*N;
STICKLINE(DDY<0,0,DDY,3,0),COLORFF8800;
STICKLINE(DDY<0,0,DDY,2.5,0),COLORFFAA00;
STICKLINE(DDY<0,0,DDY,1.5,0),COLORFFCC00;
STICKLINE(DDY<0,0,DDY,1,0),COLORFFEE00;
STICKLINE(DDY>0,0,DDY,3,0),COLOR880088;
STICKLINE(DDY>0,0,DDY,2.5,0),COLORAA00AA;
STICKLINE(DDY>0,0,DDY,1.5,0),COLORCC00CC;
STICKLINE(DDY>0,0,DDY,1,0),COLOREE00EE;
DDY1:SMA(DY,3,1),COLORFFFFFF;
DDY2:SMA(DDY1,3,1),COLOR00FFFF;
DDY3:EMA(DDY2,5),COLORFF00FF;
预警:DDY>0 AND CROSS(DDY1,DDY2) AND DDY1<0,LINETHICK;
DRAWTEXT(预警,DDY*1.06,'★'),LINETHICK3,COLOR00BBFF;
{DDZ 大单分差}
JJ:=(HIGH+LOW+CLOSE)/3;QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
QJ5:=QJ1+QJ2;QJ6:=QJ3+QJ4;DD:=(QJ5-QJ6)/(QJ5+QJ6)*100;
DDZ:DD*17,NODRAW;
DDZ1:DD*13,NODRAW;
DRAWBAND(DDZ1,RGB(0,24,224),DDZ,RGB(255,0,0));
{动力线指标}
量:=V;
换手:V/CAPITAL*100,COLORLIRED,NODRAW;
VAR1:=VOL/((H-L)*2-ABS(C-O));
买盘:=IF(C>O,VAR1*(H-L),IF(C<O,VAR1*((H-O)+(C-L)),VOL/2));
卖盘:=IF(C>O,0-VAR1*((H-C)+(O-L)),IF(C<O,0-VAR1*(H-L),0-VOL/2));
DLX:(买盘-(-卖盘))/量*换手,COLORWHITE,NODRAW;
STICKLINE((买盘-(-卖盘))/量*换手,DLX,0,2,0),VOLSTICK;
DLX1:SUM(DLX,6),COLORYELLOW;
DLX2:MA(DLX1,5),COLORFF00FF;
DLX3:MA(DLX1,10),COLORGREEN;
二、使用方法:
DDX大单动向: 红绿柱线表示当日大单买入净量占流通盘的百分比估计值,红柱表示大单买入量较大,绿柱表示大单卖出量较大;
DDX1是大单买入净量60日)平滑累加值占流通盘比例,DDX2和DDX3是其5日和10日移动平均线。
DDY涨跌动因: 红绿柱线是每日卖出单数和买入单数的差占持仓人数的比例估算值,涨跌动因是每日卖出单数和买入单数差的累计值;
DDY1是单数差的60日平滑累加值(参数P1可调),DDY2是DDY1的5日均线,DDY3是DDY1的10日均线。
DDZ大单分差: 反映大资金的实力,红色彩带表示了大资金买入强度,色带越宽、越高表示买入强度越大。
动力线指标: 外盘成交额和内盘成交额的差占总成交额的比例,反映投资者的买卖意愿。DLX红绿柱线:(外盘成交额-内盘成交额)/总成交额×换手率;
DLX1是DLX的60日移动累加值,DLX2是DLX1的5日移动平均,DLX3是DLX1的10日移动平均值。
三、说明:
公式并不使用L2数据,不知是否准确。
公式采用了函数CAPITAL,表示流通股本。除全流通股外,其它股增发或限售股解禁上市,流通股本就发生变化,因此CAPITAL也被当作未来函数,用时注意分析。
需要L2数据支持的DDE公式很简单,可惜大多数股民不能用。19楼
发一个DDX公式,网上搜集,稍加修改,仅供参考。20楼
再发一个BBD公式,网上搜集,稍加修改,仅供参考。21楼
四、附图:
[url=http://www.goodgupiao.com/gupiaogongshi/11851.html][B]DDE的四个公式[/B][/url]