参数:P1=1,P2=P3=3;
JGMR:=IF(P1=1,BIGORDER(1,3)*V/CAPITAL,selfdata('特大买入')*V/CAPITAL);
JGMC:=if(P1=1,BIGORDER(2,3)*V/CAPITAL,selfdata('特大卖出')*V/CAPITAL);
DHMR:=if(P1=1,(BIGORDER(1,2)-BIGORDER(1,3))*V/CAPITAL,selfdata('大单买入')*V/CAPITAL);
DHMC:=if(P1=1,(BIGORDER(2,2)-BIGORDER(2,3))*V/CAPITAL,selfdata('大单卖出')*V/CAPITAL);
ZHMR:=if(P1=1,(BIGORDER(1,1)-BIGORDER(1,2))*V/CAPITAL,selfdata('中单买入')*V/CAPITAL);
ZHMC:=if(P1=1,(BIGORDER(2,1)-BIGORDER(2,2))*V/CAPITAL,selfdata('中单卖出')*V/CAPITAL);
SHMR:=if(P1=1,(1-BIGORDER(1,1))*V/CAPITAL,(1-selfdata('特大买入')-selfdata('大单买入')-selfdata('中单买入'))*V/CAPITAL);
SHMC:=if(P1=1,(1-BIGORDER(2,1))*V/CAPITAL,(1-selfdata('特大卖出')-selfdata('大单卖出')-selfdata('中单卖出'))*V/CAPITAL);
JGDX:=(JGMR-JGMC)*100;
DHDX:=(DHMR-DHMC)*100;
ZHDX:=(ZHMR-ZHMC)*100;
SHDX:=(SHMR-SHMC)*100;
DRAWRECTREL(-100,-200,0,1100,RGB(1,1,1)),LAYER1;
DRAWRECTREL(0,0,50,1100,RGB(1,1,1)),colorblack,LAYER1;
DRAWTEXTREL(10,100,'特大'),colorwhite;
DRAWTEXTREL(10,350,'大单'),coloryellow;
DRAWTEXTREL(10,600,'中单'),colorffaa00;
DRAWTEXTREL(10,850,'小单'),colorgreen;
DRAWFLAGTEXT(1,0,'特大单'+STR(P2)+'日累加占流通盘:'+str(sum(JGDX,P2))+'%'),COLORWHITE;
DRAWFLAGTEXT(1,0,'大单'+STR(P3)+'日累加占流通盘:'+str(sum(DHDX,P3))+'%'),COLORYELLOW;
DRAWFLAGTEXT(1,0,'中单'+STR(P4)+'日累加占流通盘:'+str(sum(ZHDX,P4))+'%'),COLORffaa00;
DRAWFLAGTEXT(1,0,'小单'+STR(P4)+'日累加占流通盘:'+str(sum(SHDX,P4))+'%'),COLORGREEN;
DRAWFLAGTEXT(1,0,'当前获利比例:'+STR(WINNER(c)*100)+'%'),Color825BFF;
特大单:JGDX,colorwhite,LINETHICK0;
大单:DHDX,coloryellow,LINETHICK0;
中单:ZHDX,colorffaa00,LINETHICK0;
小单:SHDX,colorgreen,LINETHICK0;
特大连红天数:last(JGDX>0),Colorwhite,LINETHICK0;
大单连红天数:last(DHDX>0),coloryellow,LINETHICK0;
小单连绿天数:last(shdx<0),colorgreen,LINETHICK0;
D:=max(HHVALL(JGDX),HHVALL(DHDX),HHVALL(ZHDX),HHVALL(SHDX),ABS(LLVALL(JGDX)),ABS(LLVALL(DHDX)),ABS(LLVALL(ZHDX)),ABS(LLVALL(SHDX)));
STICKLINE(JGDX>0,4*D,4*D+JGDX,6,0),Color6D40FF;
STICKLINE(JGDX>0,4*D,4*D+JGDX,4,0),Color825BFF;
STICKLINE(JGDX>0,4*D,4*D+JGDX,3,0),Color9C7DFF;
STICKLINE(JGDX>0,4*D,4*D+JGDX,1,0),ColorB9A3FF;
STICKLINE(JGDX<0,4*D,4*D+JGDX,6,0),ColorFF9900;
STICKLINE(JGDX<0,4*D,4*D+JGDX,4,0),ColorFFBB00;
STICKLINE(JGDX<0,4*D,4*D+JGDX,3,0),ColorFFDD00;
STICKLINE(JGDX<0,4*D,4*D+JGDX,1,0),ColorFFFF00;
STICKLINE(JGDX=0,4*D,4*D,12,0),COLOR444444;
STICKLINE(DHDX>0,2*D,2*D+DHDX,6,0),Color6D40FF;
STICKLINE(DHDX>0,2*D,2*D+DHDX,4,0),Color825BFF;
STICKLINE(DHDX>0,2*D,2*D+DHDX,3,0),Color9C7DFF;
STICKLINE(DHDX>0,2*D,2*D+DHDX,1,0),ColorB9A3FF;
STICKLINE(DHDX<0,2*D,2*D+DHDX,6,0),ColorFF9900;
STICKLINE(DHDX<0,2*D,2*D+DHDX,4,0),ColorFFBB00;
STICKLINE(DHDX<0,2*D,2*D+DHDX,3,0),ColorFFDD00;
STICKLINE(DHDX<0,2*D,2*D+DHDX,1,0),ColorFFFF00;
STICKLINE(DHDX=0,2*D,2*D,12,0),COLOR444444;
STICKLINE(ZHDX>0,0,ZHDX,6,0),Color6D40FF;
STICKLINE(ZHDX>0,0,ZHDX,4,0),Color825BFF;
STICKLINE(ZHDX>0,0,ZHDX,3,0),Color9C7DFF;
STICKLINE(ZHDX>0,0,ZHDX,1,0),ColorB9A3FF;
STICKLINE(ZHDX<0,0,ZHDX,6,0),ColorFF9900;
STICKLINE(ZHDX<0,0,ZHDX,4,0),ColorFFBB00;
STICKLINE(ZHDX<0,0,ZHDX,3,0),ColorFFDD00;
STICKLINE(ZHDX<0,0,ZHDX,1,0),ColorFFFF00;
STICKLINE(ZHDX=0,0,0,12,0),COLOR444444;
STICKLINE(shdx>0,-2*D,SHDX-2*D,6,0),Color6D40FF;
STICKLINE(shdx>0,-2*D,SHDX-2*D,4,0),Color825BFF;
STICKLINE(shdx>0,-2*D,SHDX-2*D,3,0),Color9C7DFF;
STICKLINE(shdx>0,-2*D,SHDX-2*D,1,0),ColorB9A3FF;
STICKLINE(shdx<0,-2*D,SHDX-2*D,6,0),ColorFF9900;
STICKLINE(shdx<0,-2*D,SHDX-2*D,4,0),ColorFFBB00;
STICKLINE(shdx<0,-2*D,SHDX-2*D,3,0),ColorFFDD00;
STICKLINE(shdx<0,-2*D,SHDX-2*D,1,0),ColorFFFF00;
STICKLINE(SHDX=0,-2*D,-2*D,12,0),COLOR444444; |