九毛八公式指标
千钧老师的(千钧DDX)指标,请老师做个DDX1上拐选股公式. 谢谢! 同时谢谢千钧老师,怀念千钧老师,真心祝福老师一路走好。 千钧DDX 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))); DDX:((qj1+qj2)-(qj3+qj4))/sum(vol,60),COLOR00aaaa,LINETHICK0;DX:=ma(ddx,5)*N; STICKLINE(DDX>0,0,DDX,8,0),COLOR000088; STICKLINE(DDX>0,0,DDX,5,0),COLOR0000aa; STICKLINE(DDX>0,0,DDX,3,0),COLOR0000cc; STICKLINE(DDX>0,0,DDX,1,0),COLOR0000ee; STICKLINE(DDX<0,0,DDX,8,0),COLOR008800; STICKLINE(DDX<0,0,DDX,5,0),COLOR00aa00; STICKLINE(DDX<0,0,DDX,3,0),COLOR00cc00; STICKLINE(DDX<0,0,DDX,1,0),COLOR00ee00; DDX1:sma(DX,3,1),COLORFFFFFF; DDX2:sma(DDX1,3,1),COLOR00FFFF; DDX3:wma(DDX2,5),COLORFF00FF; 预警:DDX>0 and ma(v,5)>ma(ma(v,5),5) and CROSS(DDX1,DDX2),LINETHICK0; 天:=COUNT(DDX>0,5); DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK3,COLOR00FFFF; DRAWTEXTABS(180,0,'一周内翻红:'+NUMTOSTRN(天,0)+' 天'),Color00EEFF; DRAWTEXTREL(10,0,'大单动向'),ColorEEEEFF;
公式模块:
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))); ddx:=((qj1+qj2)-(qj3+qj4))/sum(VOL,60); DX:=ma(ddx,5)*N; DDX1:=SMA(DX,3,1); REF(DDX1,2)>REF(DDX1,1) AND DDX1>REF(DDX1,1);