通达信的l2资金流量副图公式
n:=60;
{逐笔大单买:LARGEINTRDVOL/10000,COLORMAGENTA;
逐笔大单卖:LARGEOUTTRDVOL/10000,COLORCYAN;
逐笔买卖差:(LARGEINTRDVOL-LARGEOUTTRDVOL)/10000,COLORBROWN;
主动买量:ACTINVOL/10000,COLORMAGENTA;
主动卖量:ACTOUTVOL/10000,COLORCYAN;
主动买卖差:(ACTINVOL-ACTOUTVOL)/10000,COLORBROWN;0;}
{STICKLINE(C 0 ,V/10000,0,-1,-1),COLOR00C0C0;}
超B:=L2_AMO(0,2)/10000;超S:=L2_AMO(0,3)/10000;
大B:=L2_AMO(1,2)/10000;大S:=L2_AMO(1,3)/10000;
中B:=L2_AMO(2,2)/10000;中S:=L2_AMO(2,3)/10000;
小B:=L2_AMO(3,2)/10000;小S:=L2_AMO(3,3)/10000;
超差:(超B-超S), COLORRED,NODRAW;
大差:(大B-大S),COLORYELLOW,NODRAW;
中差:(中B-中S),COLORBLUE,NODRAW;
小差:(小B-小S),COLORGREEN,NODRAW;
W1:= 超差;
W2:= 大差;
W3:= 中差;
W4:= 小差;
净量:W1+W2+W3+W4,COLORWHITE,NODRAW;
W1RCC:=0;W2RCC:=LLV(W1, 60);W3RCC:=LLV(W1+W2,60);W4RCC:=LLV(W1+W2+W3,60);
STICKLINE(W1 =0 AND W1 =REF(W1,1),W1RCC,W1RCC+W1,1,0),COLORRED;
STICKLINE(W1 =0 AND W1 REF(W1,1),W1RCC,W1RCC+W1,1,0),COLORYELLOW;
STICKLINE(W1 0 AND W1 =REF(W1,1),W1RCC,W1RCC+W1,1,0),COLORGREEN;
STICKLINE(W1 0 AND W1 REF(W1,1),W1RCC,W1RCC+W1,1,0),COLORBLUE;
STICKLINE(W2 =0 AND W2 =REF(W2,1),W2RCC,W2RCC+W2,1,0),COLORRED;
STICKLINE(W2 =0 AND W2 REF(W2,1),W2RCC,W2RCC+W2,1,0),COLORYELLOW;
STICKLINE(W2 0 AND W2 =REF(W2,1),W2RCC,W2RCC+W2,1,0),COLORGREEN;
STICKLINE(W2 0 AND W2 REF(W2,1),W2RCC,W2RCC+W2,1,0),COLORBLUE;
STICKLINE(W3 =0 AND W3 =REF(W3,1),W3RCC,W3RCC+W3,1,0),COLORRED;
STICKLINE(W3 =0 AND W3 REF(W3,1),W3RCC,W3RCC+W3,1,0),COLORYELLOW;
STICKLINE(W3 0 AND W3 =REF(W3,1),W3RCC,W3RCC+W3,1,0),COLORGREEN;
STICKLINE(W3 0 AND W3 REF(W3,1),W3RCC,W3RCC+W3,1,0),COLORBLUE;
STICKLINE(W4 =0 AND W4 =REF(W4,1),W4RCC,W4RCC+W4,1,0),COLORRED;
STICKLINE(W4 =0 AND W4 REF(W4,1),W4RCC,W4RCC+W4,1,0),COLORYELLOW;
STICKLINE(W4 0 AND W4 =REF(W4,1),W4RCC,W4RCC+W4,1,0),COLORGREEN;
STICKLINE(W4 0 AND W4 REF(W4,1),W4RCC,W4RCC+W4,1,0),COLORBLUE;
LLV(W1, N);LLV(W1+W2,N);LLV(W1+W2+W3,N);0;