{江哥小工具不二主图源码如下}
N:=20;
CU:=CURRBARSCOUNT;
T1:=H<HHV(H,N);
T2:=L>LLV(L,N);
T:=IF(T1,IF(T2,0,-1),1);
NOTEXTA:DRAWLINE(T=1,H,T=-1,L,0),COLORWHITE,LINETHICK2;
NOTEXTB:DRAWLINE(T=-1,L,T=1,H,0),COLORWHITE,LINETHICK2;
T3:=BARSLAST(T=1);
T4:=BARSLAST(T=-1);
TB:=CU=REFX(MAX(T3,T4),CU-1)+1;{B}
T5:=IF(TB,IF(T=1,T4,T3),0);
T6:=BARSNEXT(TB);
T7:=BARSLAST(TB);
T8:=COUNT(T=-REF(T,T7),T7);
TA:=IF(T6=DRAWNULL,IF(T8=0,2,3),IF(T6<=REFX(T5,T6),1,0));{A};
Q1:=CROSS(TA,2.5);
{颜色无法参数化,只好用两组}
NOTEXT1:DRAWLINE(Q1,H,REF(Q1,1),REF(H,1),1),COLORRED,LINETHICK3;
NOTEXT2:IF(REF(T,BARSLAST(Q1))<0,NOTEXT1,DRAWNULL),COLORGREEN,LINETHICK3;
{江哥小工具不二副图源码如下}
N:=20;
CU:=CURRBARSCOUNT,NODRAW;
T1:=H<HHV(H,N);
T2:=L>LLV(L,N);
T:=IF(T1,IF(T2,0,-1),1);
T3:=BARSLAST(T=1);
T4:=BARSLAST(T=-1);
TB:=CU=REFX(MAX(T3,T4),CU-1)+1,COLORRED;{B}
T5:=IF(TB,IF(T=1,T4,T3),0);
T6:=BARSNEXT(TB);
T7:=BARSLAST(TB);
T8:=COUNT(T=-REF(T,T7),T7);
TA:=IF(T6=DRAWNULL,IF(T8=0,2,3),IF(T6<=REFX(T5,T6),1,0)),COLORGREEN;{A};
{柱}
STICKLINE(TA=1,0,V,1,-1),COLORLIGRAY;{左}
NOTEXT1:IF(TA>1,V,DRAWNULL),VOLSTICK;{右};
{量累计线}
NOTEXT2:IF(TA=1,SUM(V,BARSLAST(TA<1)),DRAWNULL),COLORGRAY;
T9:=SUM(V,BARSLAST(TA<2));
NOTEXT3:IF(TA>1,T9,DRAWNULL),COLORRED,DOTLINE;
NOTEXT4:IF(TA>2,T9,DRAWNULL),COLORRED,LINETHICK2;{右侧的T9可信点};