M1:=5;
M2:=10;
M3:=20;
成交量:
VOL,LINETHICK0;
五日均量:MA(VOL,M1);
十日均量:MA(VOL,M2);
廿日均量:MA(VOL,M3);
預(yù)估今日成交量:IF((DYNAINFO(7)=CLOSE), DYNAINFO(38)*DYNAINFO(17),成交量),Color0000FF,LINETHICK0;
{如果最新價(jià)=
收盤價(jià),選五日均量*
量比,否則就選成交量}
FILLRGN(五日均量,十日均量,五日均量>=十日均量,RGB(255,0,0),五日均量<=十日均量,RGB(0,255,0));
{當(dāng)五日均量>=十日均量時(shí)為紅色飄帶,反之為綠色飄帶}
AAA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));{系數(shù)=成交量/((最高價(jià)-最低價(jià))*2-絕對值(收盤價(jià)-開盤價(jià)))}
主買:=IF(CLOSE>OPEN,AAA*(HIGH-LOW),IF(CLOSE<OPEN,AAA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主賣:=-IF(CLOSE>OPEN,0-AAA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AAA*(HIGH-LOW),0-成交量/2));
STICKLINE(主買>=主賣,成交量,0,7.5,0),Color0E96A9;{黃色柱表示主力的凈買量}
STICKLINE(主買>=主賣,成交量,0,7,0),Color10A7BC;{黃色框2}
STICKLINE(主買>=主賣,成交量,0,6,0),Color11B5CC;{黃色框3}
STICKLINE(主買>=主賣,成交量,0,5,0),Color13C6DF;{黃色框4}
STICKLINE(主買>=主賣,成交量,0,4,0),Color1CD2EC;{黃色框5}
STICKLINE(主買>=主賣,成交量,0,2,0),Color39D8EE;{黃色框6}
STICKLINE(主買>=主賣,成交量,0,0.5,0),ColorFFFFFF;{黃色框7}
STICKLINE(主買<主賣,成交量,0,7.5,0),ColorCA6500;{藍(lán)色柱主力的凈賣量}
STICKLINE(主買<主賣,成交量,0,7,0),ColorE17100;{藍(lán)色框2}
STICKLINE(主買<主賣,成交量,0,6,0),ColorF27900;{藍(lán)色框3}
STICKLINE(主買<主賣,成交量,0,5,0),ColorFF850B;{藍(lán)色框4}
STICKLINE(主買<主賣,成交量,0,4,0),ColorFF9326;{藍(lán)色框5}
STICKLINE(主買<主賣,成交量,0,2,0),ColorFFA042;{藍(lán)色框6}
STICKLINE(主買<主賣,成交量,0,0.5,0),colorFFFF00;{藍(lán)色框7}
STICKLINE(1>0,0,主買,7.5,0),ColorA200A2;{玫紅柱1}
STICKLINE(1>0,0,主買,7,0),ColorB700B7;{玫紅柱2}
STICKLINE(1>0,0,主買,6,0),ColorCE00CE;{玫紅柱3}
STICKLINE(1>0,0,主買,5,0),ColorE800E8;{玫紅柱4}
STICKLINE(1>0,0,主買,4,0),ColorFF00FF;{玫紅柱5}
STICKLINE(1>0,0,主買,2,0),ColorFF60FF;{玫紅柱6}
STICKLINE(1>0,0,主買,0.5,0),ColorFFD2FF;{玫紅柱7}
BBB:=LONGCROSS(成交量,五日均量,4);{全紅柱表示今天的成交量超過五日均量}
STICKLINE(BBB,0,成交量,7.5,0),color070084;{全紅柱1}
STICKLINE(BBB,0,成交量,7,0),color0000A3;{全紅柱2}
STICKLINE(BBB,0,成交量,6,0),color0000B7;{全紅柱3}
STICKLINE(BBB,0,成交量,5,0),color0000CD;{全紅柱4}
STICKLINE(BBB,0,成交量,4,0),color0000E9;{全紅柱5}
STICKLINE(BBB,0,成交量,2,0),color0754E9;{全紅柱6}
STICKLINE(BBB,0,成交量,0.5,0),Color68B8FF;{全紅柱7}
DL:=FILTER(成交量=LLV(成交量,20),5);{全綠柱表示今天是最近5天的成交量中是20日均量的最低量}
STICKLINE(DL,0,成交量,7.5,0),Color006400;{全綠柱1}
STICKLINE(DL,0,成交量,7,0),Color007500;{全綠柱2}
STICKLINE(DL,0,成交量,6,0),Color008400;{全綠柱3}
STICKLINE(DL,0,成交量,5,0),Color009900;{全綠柱4}
STICKLINE(DL,0,成交量,4,0),Color00AE00;{全綠柱5}
STICKLINE(DL,0,成交量,2,0),Color00BD00;{全綠柱6}
STICKLINE(DL,0,成交量,0.5,0),Color8EFF8E;{全綠柱7}
DRAWTEXTREL(0,0,'成交量'),COLORYELLOW;
{DRAWTEXTREL(600,900,'證券代碼: '+STKLABEL+' 證券名稱: '+STKNAME+''),ColorFFAA00;}
{預(yù)計(jì)今天成交量}
今天成交額:=AMOUNT/10000;
昨天成交額:=REF(今天成交額,1);
交易分鐘數(shù):=if(CURRENTTIME>93000 and CURRENTTIME<150000 and DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,
if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200)/60,
if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600)/60,120)),240);
預(yù)測今天:=今天成交額/交易分鐘數(shù)*240;
交易分時(shí):=FRACPART( 交易分鐘數(shù)/60);
剩余分時(shí):=交易分時(shí)*60;
剩余秒:=FRACPART( 剩余分時(shí));
剩余秒時(shí):=剩余秒*60;
交易小時(shí):=交易分鐘數(shù)/60 ;
{顯示文字}
DRAWTEXTABS(125,0,'昨天金額:'+NUMTOSTRN(昨天成交額/10000,2)+'億'),ColorF5FF00,LINETHICK1;
DRAWTEXTABS(125,13,'預(yù)計(jì)今天:'+NUMTOSTRN(預(yù)測今天/10000,2)+'億'),COLOR00FFFF,LINETHICK1;
DRAWTEXTABS(450,2,'交易時(shí)間:'+INTPART(交易小時(shí))+'小時(shí)'+NUMTOSTRN(剩余分時(shí),0)+'分 '+NUMTOSTRN(剩余秒時(shí),0)+'秒'+' 已成交金額'+':'+NUMTOSTRN(今天成交額/10000,2)+'億元 '),ColorF5FF00,LINETHICK2,PRECIS2;
{柱圖}
圖長度像素:=230*0.5;
昨天圖長度:=230+圖長度像素;
預(yù)測今天圖:=(預(yù)測今天/昨天成交額)*圖長度像素+230;
目前成交圖:=(今天成交額/昨天成交額)*圖長度像素+230;
DRAWRECTABS(230,1,昨天圖長度,9 ,RGB(0,255,150));
DRAWRECTABS(230,13,目前成交圖, 23 ,RGB(255,73,20));
DRAWRECTABS(230,16,預(yù)測今天圖,20 ,RGB(255,255,0));
{立柱說明}
DRAWRECTREL( 0,140,115,860,RGB(20,20,20));
DRAWRECTREL( 0,140,15,280,RGB(255,255,0));
DRAWTEXTREL(20,140,'主力的凈買量'),COLORYELLOW;
DRAWRECTREL( 0,280,15,420,RGB(0,255,255));
DRAWTEXTREL(20,280,'主力的凈賣量'),COLORFFFF00;
DRAWRECTREL( 0,420,15,560,RGB(255,25,0));
DRAWTEXTREL(20,420,'超過五日均量'),COLOR0025FF;
DRAWRECTREL( 0,560,15,700,RGB(0,255,0));
DRAWTEXTREL(20,560,'低于廿日均量'),COLOR00FF00;
DRAWRECTREL( 0,700,15,840,RGB(200,0,200));
DRAWTEXTREL(20,700,'主力外成交量'),COLORFF00FF;