MA1:=MA(CLOSE,5);
MA2:=MA(CLOSE,10);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
DIFF:=SUM(MA1-MA2,0);
SUMMACD:=SUM(MACD,0);
W1:=BARSLAST(CROSS(MA2,MA1))+1;
W2:=BARSLAST(CROSS(MA1,MA2))+1;
W3:=BARSLAST(CROSS(MACD,0))+1;
W4:=BARSLAST(CROSS(-MACD,0))+1;
k:=0;
趋势力度:IF(K,SUMMACD-REF(SUMMACD,MIN(W3,W4)),DIFF-REF(DIFF,MIN(W1,W2)));
趋势平均力度:趋势力度/IF(K,(MIN(W3,W4)+1)/20,(MIN(W1,W2)+1)/20),COLORSTICK;
MAX趋势平均力度:HHV(趋势平均力度,34);
MIN趋势平均力度:LLV(趋势平均力度,34);