MA5:MA(C,5);
MA10:MA(C,10);
均线差:=MA5-MA10;JC:=MA10-MA5;
绿柱面积:=IF (均线差<0,SUM(均线差*0.1,BARSLAST(JC<0)),0);
红柱面积:=IF (均线差>0,SUM(均线差*0.1,BARSLAST(JC>0)),0);
均线面积:IF(均线差>0,红柱面积,绿柱面积),color0000ff,LINETHICK0;
A1:=IF(均线差>0,1,-1);
A2:=REF(A1,1);
A3:=A1*A2;
A4:=BARSLAST(A3<0);
A5:=A4+1;
趋势平均力度:(SUM(均线差,0)-REF(SUM(均线差,0),A5))/A5,colorFF00FF,LINETHICK0;
drawnumber(ref(均线差,1)>0 and 均线差<=0 ,HHV(H,8),ref(红柱面积,1),3),ALIGN2,pxup20,colorred;
drawnumber(ref(均线差,1)>0 and 均线差<=0 ,HHV(H,8),ref(趋势平均力度,1),3),ALIGN2,pxup45,colorff00ff;
drawnumber(ref(均线差,1)<0 and 均线差>=0 ,LLV(L,8),ref(abs(绿柱面积),1),3),ALIGN2,pxdn5,Color004A00;
drawnumber(ref(均线差,1)<0 and 均线差>=0 ,LLV(L,8),ref(abs(趋势平均力度),1),3),ALIGN2,pxdn30,colorff00ff;
drawnumber(islastbar and 均线差<0,LLV(L,5),abs(绿柱面积),3),align2,pxdn5,Color004A00;
drawnumber(islastbar and 均线差<0,LLV(L,5),abs(趋势平均力度),3),align2,pxdn30,Colorff00ff;
drawnumber(islastbar and 均线差>0,HHV(H,5),abs(红柱面积),3),align2,pxup20,colorred;
drawnumber(islastbar and 均线差>0,HHV(H,5),abs(趋势平均力度),3),align2,pxup45,colorff00ff;