TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,1))))); MTIME:=MOD(FROMOPEN,TOTAL); CTIME:=IF(MTIME<0.5,TOTAL,MTIME); VVOL:IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW; STICKLINE(CURRBARSCOUNT=1 && (SETCODE=0 || SETCODE=1),VVOL,0,-1,-1),COLOR00C0C0;
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 買盤:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL /2)); 賣盤:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL /2)); 換手:VOL/CAPITAL*100,POINTDOT,COLORWHITE; 獲利:WINNER(CLOSE)*100; 凈流:=買盤-賣盤,NODRAW; LS_JW:=(C+2*LOW+HIGH)/4; 力道:=(LS_JW-MA(C,20)),LINETHICK1,COLORRED; 成交量比%:買盤/VOL*100,COLORWHITE,NODRAW;
STICKLINE(C>O OR (C=O AND 買盤>賣盤),0,VOL,2.5,1),COLORRED; STICKLINE(C<O OR (C=O AND 買盤<賣盤),0,VOL,2.5,1),COLORCYAN;
STICKLINE(C<O OR (C=O AND 買盤<賣盤),0,ABS(賣盤),2.5,0),COLORCYAN; STICKLINE(C>O OR (C=O AND 買盤>賣盤),0,買盤,2.5,0),COLORRED; STICKLINE(C/REF(C,1)>=1.099,0,VOL,2.5,0),COLORYELLOW;
STICKLINE(REF(C,1)/C>=1.099 AND C<O AND C<REF(C,1),0,VOL,2.5,0),COLORBLUE;
倍量:=V>REF(V,1)*2; N:=BARSLAST(倍量); 常數(shù):=CONST(IF(N=0,V,REF(V,N))); GG:=C>O; STICKLINE ((倍量 AND 倍量) OR (C>REF(C,1) AND C=O AND 倍量),0,V,0,0),COLORYELLOW; 陰線:=C<O; STICKLINE ((倍量 AND 陰線) OR (C<REF(C,1) AND C=O AND 倍量),0,V,0,0),COLORYELLOW; 備注:=REFX(CROSS(常數(shù),V),1); 最后倍量:=IF(倍量,V,0)=REFX(REF(V,BARSLAST(倍量)),BARSNEXT(ISLASTBAR)); TT:=BARSLAST(備注); TS:=IF(ISLASTBAR AND 最后倍量,REF(TT,1)+1,TT); 條件:=IF(備注,V,0)=REFX(REF(V,TS),BARSNEXT(倍量)); 天:=BARSLAST(條件); IF(天<=REFX(REF(BARSNEXT(最后倍量),天),最后倍量),DRAWLINE(條件,常數(shù),ISLASTBAR,常數(shù),1),DRAWNULL),COLORYELLOW,DOTLINE; 倍量橫線:=IF(天<=REFX(REF(BARSNEXT(最后倍量),天),最后倍量),DRAWLINE(條件,常數(shù),ISLASTBAR,常數(shù),1),DRAWNULL),COLORYELLOW,DOTLINE;
天數(shù):=IF(ISLASTBAR AND 最后倍量,REF(天,1)+1,IF(倍量橫線,天,DRAWNULL)),COLORRED,NODRAW; DRAWNUMBER(最后倍量,V,天數(shù));
超B:=L2_AMO(0,2)/10000.0; 大B:=L2_AMO(1,2)/10000.0; 中B:=L2_AMO(2,2)/10000.0; 小B:=L2_AMO(3,2)/10000.0; 超S:=L2_AMO(0,3)/10000.0; 大S:=L2_AMO(1,3)/10000.0; 中S:=L2_AMO(2,3)/10000.0; 小S:=L2_AMO(3,3)/10000.0; TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0); 凈流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S); 超大單:=(超B)-(超S); 大單:=(大B)-(大S); 中單:=(中B)-(中S); 小單:=(小B)-(小S); DAZHI:=CONST(MAX(ABS(凈流入),MAX(ABS(超大單),MAX(ABS(大單),MAX(ABS(中單),ABS(小單)))))),NODRAW; DRAWRECTREL(0,0,282,999.2,IF(120,RGB(10,0,0),0)); DRAWRECTREL(0,CONST(880-(ABS(凈流入)*500/DAZHI)),50,880,IF(CONST(凈流入)>0,RGB(255,0,0),RGB(23,125,255))); DRAWRECTREL(58,CONST(880-(ABS(超大單)*500/DAZHI)),108,880,IF(CONST(超大單)>0,RGB(102,0,204),RGB(23,125,255))); DRAWRECTREL(116,CONST(880-(ABS(大單)*500/DAZHI)),166,880,IF(CONST(大單)>0,RGB(255,0,0),RGB(23,125,255))); DRAWRECTREL(174,CONST(880-(ABS(中單)*500/DAZHI)),224,880,IF(CONST(中單)>0,RGB(255,0,0),RGB(23,125,255))); DRAWRECTREL(232,CONST(880-(ABS(小單)*500/DAZHI)),282,880,IF(CONST(小單)>0,RGB(255,0,0),RGB(0,128,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.002,1,0,'凈流入'),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.060,1,0,'超大單'),COLOR660099; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.126,1,0,'大單'),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.181,1,0,'中單'),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.241,1,0,'小單'),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.0,0.001,0,'單位(萬元)'),COLORYELLOW; {M:=0.53;M1:=0.33;}M:=0.58;M1:=0.39; DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.001,0.790,0,CEILING(凈流入)); DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.059,0.790,0,CEILING(超大單)); DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.116,0.790,0,CEILING(大單)); DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.175,0.790,0,CEILING(中單)); DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.232,0.790,0,CEILING(小單));
|