Chb:=IF(TODAY, DDEDATA@BIGORDER (1,3),bigorder(1,3));
Dhb:=IF(TODAY,( DDEDATA@BIGORDER (1,2)- DDEDATA@BIGORDER (1,3)),(bigorder(1,2)-bigorder(1,3)));
Chs:=IF(TODAY, DDEDATA@BIGORDER (2,3),bigorder(2,3));
Dhs:=IF(TODAY,( DDEDATA@BIGORDER (2,2)- DDEDATA@BIGORDER (2,3)),(bigorder(2,2)-bigorder(2,3)));
特买入:=chb;
特卖出:=chs;
大买入:=dhb;
大卖出:=dhs;
总成交量:=vol;
主力增仓:=(大买入+特买入)*总成交量;
主力减仓:=(大卖出+特卖出)*总成交量;
主力净买:=主力增仓-主力减仓;
主力增度:=主力增仓/总成交量;
主力减度:=主力减仓/总成交量;
主力活跃度:(主力增仓+主力减仓)/CAPITAL/2*100,linethick0;
买卖气:(主力净买/总成交量)*100,linethick0;
STICKLINE(主力净买 =0 and 买卖气=0,0,主力活跃度,8,0),color666666;
STICKLINE(主力净买 =0 and 买卖气 0 and 买卖气 20,0,主力活跃度,8,0),color000099;
STICKLINE(主力净买 =0 and 买卖气 =20 and 买卖气 40,0,主力活跃度,8,0),color000099;
STICKLINE(主力净买 =0 and 买卖气 =40 and 买卖气 60,0,主力活跃度,8,0),COLORRED;{
STICKLINE(主力净买 =0 and 买卖气 =60,0,主力活跃度,8,0),colorFF00FF;}
STICKLINE(主力净买 0 and 买卖气 =0 and 买卖气 -20,0,主力活跃度,8,0),color006633;
STICKLINE(主力净买 0 and 买卖气 =-20 and 买卖气 -40,0,主力活跃度,8,0),color00CC33;
STICKLINE(主力净买 0 and 买卖气 =-40,0,主力活跃度,8,0),COLOR00ff00;
N日飘红天数:=count(买卖气 0,10);
tt:=if(买卖气 0,1,0);
连续飘红:=BARSLAST(tt
STR1:='【 '+'买卖气:'+NUMTOSTR(买卖气)+' '+'10日内'+NUMTOSTR(N日飘红天数)+'天做多'+' '+'最近'+NUMTOSTR(连续飘红)+'天连续飘红。】';
DRAWTEXTABS( 0,0 ,str1 ),COLORffffff;
V2:=IF(BARSTATUS=2,主力活跃度*240/CURRENTTIME/REF(主力活跃度,1)-1,主力活跃度/REF(主力活跃度,1)-1);
STICKLINE(V2 =1,0,主力活跃度,2,0),COLORYELLOW;
关注:1,POINTDOT;
预警:1.3,POINTDOT;
机会:2,POINTDOT,color00aaaa;
五日活跃:EMA(主力活跃度,5);
十日活跃:EMA(主力活跃度,10);
二十日活跃:EMA(主力活跃度,20);
{盖印
DRAWRECTABS(0,0,30,35,rgb(250,60,80)),color000099;
DRAWRECTABS(0,30,30,45,rgb(250,250,80)),color009999;
DRAWTEXTABS(2,5,'虎拓'),colorFFFFFF,LINETHICK1;
DRAWTEXTABS(2,18,'经典'),colorFFFFFF,LINETHICK1;
DRAWTEXTABS(4,30,'HJY'),color0000FF,LINETHICK1;};