很有创意的副图指标(量价趋势,三角面积)
N:=120;
DH:=(MIN(C,O)+2*H)/3;
XL:=(MAX(C,O)+2*L)/3;
重心:=(DH+XL)/2;
均价:=AMOUNT/(VOL*100);
折价:=IF(INDEXC=C,重心,(重心+均价)/2);
LB:=(SUM(V,25)/REF(SUM(V,125),1)+SUM(V,5)/REF(SUM(V,25),1)+V/REF(MA(V,5),1))/3;
XP:=BARSLAST(CROSS(SUM(LB,N),N/2));
乖线:((折价/REF(折价,XP)-1)*100),COLORWHITE;
离线:MA(乖线,25),COLORMAGENTA;
基线:MA(乖线,XP+1),COLORGREEN;
离乖:=((乖线+70)/(离线+70)-1)*100;
基乖:=((乖线+70)/(基线+70)-1)*100;
零乖:=((乖线+70)/70-1)*100;
眼:(3*离乖+2*基乖+零乖)/6,COLORSTICK;
零界线:0,COLORGRAY;
N:=30;
A1:=MA(C,5);
A2:=LLV(A1,N);
高:=A1-A2;
底长:=N*0.825;
S三角:底长*高/2,COLORWHITE,LINETHICK3;
DRAWBAND(S三角,120,2,RGB(36,136,36));
MS5:MA(S三角,5);
MS10:MA(S三角,10);
A0:=MA(C,1);
A02:=LLV(A1,N);
高1:=A0-A02;
底长1:=N*0.825;
S三角1:=底长1*高1/2,COLORWHITE,LINETHICK1;
STICKLINE(C>=REF(C,1),REF(S三角1,1),S三角1,2,1),COLORRED;
STICKLINE(C<REF(C,1),REF(S三角1,1),S三角1,2,1),COLORCYAN;