手机端
当前位置:爱约股 > 公式技巧 > 把这个DDX公式改成通达信的

把这个DDX公式改成通达信的

 网友求助:

烦请老师改下。 或是哪位老师有更好的DDX指标能让我分享下
郑云老师你好没通过是怎么回事啊?
( 错误句 :
DDX3:WMA(DDX2,5)
详细信息 : 您在括号前写的不是函数、公式等,
且缺少必要的运算符!
错误起始位置 : 588 ; 长度: 3)


N:=5;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))/SUM(VOL,10)*10,COLOR3D;
DX:=ma(ddx,5)*N;
DDX1:sma(DX,3,1);
DDX2:sma(DDX1,3,1);
DDX3:wma(DDX2,5);
1,DOTLINE;
预警:=DDX>0 and ma(v,5)>ma(ma(v,5),5) and CROSS(DDX1,DDX2);
天:=COUNT(DDX>0,5);
DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK3,COLOR00FFFF;
DRAWTEXTABS(180,0,'一周内翻红:'+NUMTOSTRN(天,0)+' 天'),Color00EEFF;
DRAWTEXTABS(0,0,'大单动向');
 

 

解答如下:

N:=5;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))/SUM(VOL,10)*10,NODRAW;
STICKLINE(DDX>=0,DDX,0,2,0),COLOR8977FF;
STICKLINE(DDX<0,DDX,0,2,0),COLORFFFF00;
DX:=MA(DDX,5)*N;
DDX1:SMA(DX,3,1);
DDX2:SMA(DDX1,3,1);
DDX3:WMA(DDX2,5);
1,DOTLINE;
预警:=DDX>0 AND MA(V,5)>MA(MA(V,5),5) AND CROSS(DDX1,DDX2);
天:=COUNT(DDX>0,5);
DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK3,COLOR00FFFF;
DRAWTEXT_FIX(1,0,0,0,'一周内翻红:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.06,0,0,CONST(天)),COLORYELLOW;
DRAWTEXT_FIX(1,0,0.1,0,'大单动向'),COLORYELLOW;
 

TAG:
分享至:

相关推荐