股东增减 (副图 源码 贴图)
{股东增减----一品茶缘编写,大智慧L2副图指标}
INPUT:N(2010,1990,3000),Y(11,1,12);
N1:=IF(Y>3,N,N-1);
N2:=IF(Y>6,N,N-1);
N3:=IF(Y>9,N,N-1);
一季报:=PFFINON(4253 ,N1 ,0331);
半年报:=PFFINON(4253 ,N2 ,0630);
三季报:=PFFINON(4253 ,N3 ,0930);
上年报:=PFFINON(4253 ,N-1,1231);
最新人数:IF(Y>9,三季报,IF(Y>6,半年报,IF(Y>3,一季报,上年报))),COLOR00FFFF,PRECIS0,linethick0;
上1季:IF(Y>9,半年报,IF(Y>6,一季报,IF(Y>3,上年报,三季报))),COLORFF00FF,PRECIS0,linethick0;
上2季:IF(Y>9,一季报,IF(Y>6,上年报,IF(Y>3,三季报,半年报))),COLOR00FF00,PRECIS0,linethick0;
上3季:IF(Y>9,上年报,IF(Y>6,三季报,IF(Y>3,半年报,一季报))),COLORFFFFFF,PRECIS0,linethick0;
股东增减%:IF(Y>9,(三季报-半年报)/半年报*100,IF(Y>6,(半年报-一季报)/一季报*100,
IF(Y>3,(一季报-上年报)/上年报*100,(上年报-三季报)/三季报*100))),COLOR0000FF,PRECIS2,linethick0;
人均持股:CAPITAL*100/最新人数,COLORFF6600,PRECIS2,linethick0;
持股比例:人均持股*100/CAPITAL,COLOR00FFFF,PRECIS2;
XG:最新人数<上1季;
{以下设置副图柱体显示方式}
W:=BARSLAST(DISPSTATUS=1);
P:=BACKSET(BARSTATUS=2,W/2);
K:=BARSLAST(CROSS(P,0.5));
X:=max(最新人数,上1季,上2季,上3季);
STICKLINE(K=1,0-X/3,0-X/3,1,0),coloryellow,DOTLINE;
Y1:=CEILING((W-K)/10);
STICKLINE(K=0,0,上3季,8,0),colorffffff;
STICKLINE(K=Y1*1,0,上2季,8,0),color00ff00;
STICKLINE(K=Y1*2,0,上1季,8,0),colorff00ff;
STICKLINE(K=Y1*3,0,最新人数,8,0),coloryellow;
DRAWTEXT(K=0,0-X/10,'上3季'),colorffffff;
DRAWTEXT(K=Y1*1,0-X/10,'上2季'),color00ff00;
DRAWTEXT(K=Y1*2,0-X/10,'上1季'),colorff00ff;
DRAWTEXT(K=Y1*3,0-X/10,'最新'),coloryellow;
{以下设置股东人数增减情况点评}
DRAWRECTREL(0,0,320,1000,RGB(0,0,200));
DRAWTEXTREL(25,30,'股票名称:'+'【'+STKLABEL+' '+STKNAME+'】'),COLOR0000FF;
DRAWTEXTREL(25,850,'====【一品茶缘】===='),COLOR889999;
DRAWTEXTREL(10,200,'■最新周期:'+NUMTOSTRN(N,0)+'年'+NUMTOSTRN(Y,0)+'月'),COLORFFFFFF;
IF 股东增减%<-10 THEN BEGIN DRAWTEXTREL(10,350,'★股东人数大幅减少'+NUMTOSTRN(股东增减%,2)+'%,筹码快速集中!'),COLOR00FFFF;end;
IF 股东增减%>10 THEN BEGIN DRAWTEXTREL(10,350,'☆股东人数大幅增加'+NUMTOSTRN(股东增减%,2)+'%,筹码快速分散!'),COLORFF8800;end;
IF BETWEEN(股东增减%,0,-10) THEN BEGIN DRAWTEXTREL(10,350,'◆股东人数小幅减少'+NUMTOSTRN(股东增减%,2)+'%,筹码趋向集中!'),COLOR00FFFF;end;
IF BETWEEN(股东增减%,0,10) THEN BEGIN DRAWTEXTREL(10,350,'◇股东人数小幅增加'+NUMTOSTRN(股东增减%,2)+'%,筹码趋向分散!'),COLOR00AA00;end;
DRAWTEXTREL(10,500,'◇人均持股:'+NUMTOSTRN(人均持股,2)+'股,占流通盘万分之:'+NUMTOSTRN(持股比例,2)),colorff00ff;
IF 持股比例>1 THEN BEGIN DRAWTEXTREL(10,650,'★人均持股比例极高,筹码高度集中!'),color0000ff;end;
IF BETWEEN(持股比例,0.5,1) THEN BEGIN DRAWTEXTREL(10,650,'☆人均持股比例较高,筹码相对集中!'),coloryellow;end;
IF BETWEEN(持股比例,0.1,0.5) THEN BEGIN DRAWTEXTREL(10,650,'◆人均持股比例较低,筹码相对分散!'),color00AA00;end;
IF 持股比例<0.1 THEN BEGIN DRAWTEXTREL(10,650,'◇人均持股比例极低,筹码极度分散!'),colorff6600;end;
|