N:=5;M:=3;
TRTR:=EXPMEMA(MAX(MAX(HIGH-LOW,Abs(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI: DMP*100/TRTR;
mdi: DMM*100/TRTR;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:EXPMEMA(ADX,M);
BB:=ADX-REF(ADX,1);
IF(BB<=0,ADX,DRAWNULL),COLORRED,LINETHICK2;
趋势:3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA
(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),POINTDOT,COLORRED;
启动在即: IF(crOSS(趋势,3),100,0),COLORFF00FF;秘密买点: IF(趋势<=3,25,0),COLORRED;
机构建仓: IF(趋势<5,45,0),COLORWHITE;