gitee.com/quant1x/engine@v1.8.4/factors/feature_box_dkqs.tdx (about) 1 {多空趋势, V1.1.2, 2023-09-13} 2 {量能柱} 3 SCALE:=100; 4 N:=3; 5 NN:=MIN(BARSCOUNT(CLOSE),N); 6 CNN:=REF(CLOSE,NN); 7 CDIFF:=CLOSE-CNN,COLORSTICK; 8 FF:=CDIFF/CNN; 9 MADK:SCALE*FF,COLORSTICK; 10 11 {多空趋势} 12 MAXH:=MAX(HIGH,REF(CLOSE,1)); 13 MINL:=MIN(LOW,REF(CLOSE,1)); 14 15 DIFFK:=IFF(OPEN>=CLOSE,OPEN-CLOSE,OPEN-LOW); 16 TZ1:=OPEN-REF(CLOSE,1)-DIFFK; 17 TZ2:=TZ1/OPEN; 18 K0:SCALE*TZ2; 19 K:ABS(K0),DOTLINE; 20 DIFFD:=IFF(OPEN>=CLOSE,HIGH-OPEN,HIGH-CLOSE); 21 TD1:=CLOSE-MINL+DIFFD; 22 TD2:=TD1/CLOSE; 23 D:SCALE*TD2; 24 B:CROSS(D,K); 25 S:CROSS(K,D); 26 DRAWICON(B,20,1); 27 DRAWICON(S,20,2);