MTR:=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),14);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14);
PDI:=DMP*100/MTR;
MDI:=DMM*100/MTR;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,6);
ADX>30 AND VOL/CAPITAL*100>3 AND V/REF(MA(V,5),1)>2 AND (C-REF(C,1))/REF(C,1)*100>3;
**************************************************************************************************************************************************************
主图:
CJL1:=IF(DYNAINFO(10)>99999999, STRCAT(CON2STR(DYNAINFO(10)/100000000,2), '亿'), STRCAT(CON2STR(DYNAINFO(10)/10000,0), '万'));
DRAWTEXT_FIX(1, 0.01, 0.01, 0, CJL1), COLOR0099FF;
LC:=REF(CLOSE,1);
WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;
活跃:=(WRSI-WR10);
活跃度比:=IF(活跃>=0, (活跃+100)/2, 100-ABS((活跃-100)/2)) >= 90;
DRAWTEXT_FIX(1, 0.30, 0.25, 1, STRCAT(STRCAT('活跃:', CON2STR(活跃度比,2)), '%')), COLORCYAN;
STICKLINE((活跃度比) AND TIME<=0932, L, L*0.9, 8, 0), COLORMAGENTA;
工作线:=EMA(CLOSE,14), COLORFFFFFF;
生命线:=EMA(CLOSE,47);
VAR326:=IF(CLOSE>REF(CLOSE,1), 88, 0);
VAR327:=IF(CLOSE/REF(CLOSE,1)>1.030 AND HIGH/CLOSE<1.010 AND VAR326>0, 91, 0);
{STICKLINE(VAR327>90, L*0.99, L*0.95, 4, 0), COLORGREEN;
STICKLINE(VAR327>90 AND CJL1, L*0.9, L*0.999, 2, 0), COLORMAGENTA;
DRAWTEXT(VAR327>90, LOW*0.66, '追涨'), COLORGREEN;}
VAR1:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100;
牛:=SMA(VAR1,7,1);
VAR2:=SMA(牛,5,1);
熊:=IF(CROSS(牛,VAR2) AND CROSS(MA(C,5),MA(C,13)) AND 牛>50, VAR2*2, VAR2);
N:=14;
M:=6;
TRR:=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 AND HD>LD, HD, 0), N);
DMM:=EXPMEMA(IF(LD>0 AND LD>HD, LD, 0), N);
PDI:=DMP*100/TRR, COLORMAGENTA;
MDI:=DMM*100/TRR, COLORGREEN;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100, M);
ADXR:=EXPMEMA(ADX, M);
{STICKLINE(ADX>=ADXR, ADX, ADXR, 5, 0), COLORGRAY;
STICKLINE(ADX<ADXR, ADX, ADXR, 5, 1), COLORBLUE;}
关注:=STICKLINE(BARSLAST(CROSS(MDI,PDI))<5 AND MDI>PDI AND ADX<ADXR AND MDI>ADXR*0.97, ADX, ADXR, 2, 0), COLORRED;
DRAWTEXT(CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1) AND ADX>REF(ADX,1) AND BETWEEN(ADX,MDI,PDI) AND ADXR>REF(ADXR,1), ADXR*0.98, '走强'), COLORYELLOW;
STICKLINE(CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1) AND ADX>REF(ADX,1) AND BETWEEN(ADX,MDI,PDI) AND ADXR>REF(ADXR,1) AND TIME<=0935, L, H*0.99, 8, 0), COLORMAGENTA;
MA5:=MA(C,5), COLORYELLOW;
MA10:=MA(CLOSE,10), COLORFF00FF;
MA30:=MA(C,30), COLORRED, LINETHICK2;
跌:=IF(MA(CLOSE,30)<=REF(MA(CLOSE,30),1), MA(CLOSE,30), DRAWNULL), COLORGREEN, LINETHICK2;
MA60:=MA(CLOSE,60), COLORFFCC66;