B:=SUM(AMOUNT*CLOSE,1)/SUM(AMOUNT,1);
B1:=EMA(B,5);
HGW5:=(B-B1)*100/B,NODRAW,COLORRED;
HGW6:=HGW5!=DRAWNULL;
HGW7:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
HGW8:=SMA(HGW7,4,1);
HGW9:=SMA(HGW8,3,1);
HGW10:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;
HGW11:=SMA(HGW10,6,1);
HGW12:=SMA(HGW11,3,1);
HGW13:=EMA(CLOSE,17);
HGW14:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
HGW15:=SMA(HGW14,3,1);
HGW16:=SMA(HGW15,3,1);
HGW17:=3*HGW15-2*HGW16;
HGW18:=HGW17>=95;
HGW19:=REF(CLOSE,1);
HGW20:=SMA(MAX(CLOSE-HGW19,0),9,1)/SMA(ABS(CLOSE-HGW19),9,1)*100;
HGW21:=HGW20>=75;
HGW22:=FORCAST(EMA(CLOSE,5),6);
HGW23:=FORCAST(EMA(CLOSE,8),6);
HGW24:=FORCAST(EMA(CLOSE,11),6);
HGW25:=FORCAST(EMA(CLOSE,14),6);
HGW26:=FORCAST(EMA(CLOSE,17),6);
HGW27:=HGW22+HGW23+HGW24+HGW25-4*HGW26;
HGW28:=EMA(HGW27,2);
趋势:HGW11>HGW12 AND HGW12>REF(HGW12,1) AND HGW6,NODRAW,COLORYELLOW;
动能:HGW28>REF(HGW28,1),NODRAW,COLORRED;
加速:HGW18 OR HGW21,NODRAW,COLORLIMAGENTA;
资金:HGW5>0 AND CLOSE>HGW13 AND HGW13>REF(HGW13,1),NODRAW,COLOR0080FF;
异动:CLOSE>=OPEN AND CROSS(HGW8,HGW9) AND HGW9<=50 AND HGW6,NODRAW,COLORFF0080;
STICKLINE(趋势>0,4.8,5.8,1.5,0),COLORYELLOW;
STICKLINE(趋势=0,4.8,5.8,1.5,1),COLORGRAY;
STICKLINE(动能>0,3.6,4.6,1.5,0),COLORRED;
STICKLINE(动能=0,3.6,4.6,1.5,1),COLORGRAY;
STICKLINE(加速>0,2.4,3.4,1.5,0),COLORLIMAGENTA;
STICKLINE(加速=0,2.4,3.4,1.5,1),COLORGRAY;
STICKLINE(资金>0,1.2,2.2,1.5,0),COLOR0080FF;
STICKLINE(资金=0,1.2,2.2,1.5,1),COLORGRAY;
STICKLINE(异动>0,0,1,1.5,0),COLORFF0080;
STICKLINE(异动=0,0,1,1.5,1),COLORGRAY;
DRAWRECTREL(60,1000,0,0,RGB(10,0,0)),COLORBLACK;{UNDEFINED活动框};
DRAWTEXT_FIX(1,0.00,0.02,0,'趋势'),COLORYELLOW;
DRAWTEXT_FIX(1,0.00,0.25,0,'动能'),COLORRED;
DRAWTEXT_FIX(1,0.00,0.45,0,'加速'),COLORLIMAGENTA;
DRAWTEXT_FIX(1,0.00,0.65,0,'资金'),COLOR0080FF;
DRAWTEXT_FIX(1,0.00,0.85,0,'异动'),COLORFF0080;