上榜主图源码如下:
M:=10;
上市天数:=FINANCE(42);
涨停价1:=ZTPRICE(REF(C,1),0.1),NODRAW;
跌停价1:=DTPRICE(REF(C,1),0.1),NODRAW;
涨停价2:=ZTPRICE(REF(C,1),0.2),NODRAW;
跌停价2:=DTPRICE(REF(C,1),0.2),NODRAW;
涨停价3:=ZTPRICE(REF(C,1),0.05),NODRAW;
跌停价3:=DTPRICE(REF(C,1),0.05),NODRAW;
ST:=NAMELIKE('ST') OR NAMELIKE('*ST'),NODRAW;
创业板:=IF(CODELIKE('30'),1,0),NODRAW;
科创板:=IF(CODELIKE('68'),1,0),NODRAW;
涨停:=IF(ST AND C=涨停价3,1,0) + IF(创业板 AND ST=0 AND C=涨停价2,1,0) + IF(科创板 AND C=涨停价2,1,0) + IF(ST=0 AND 创业板=0 AND 科创板=0 AND C=涨停价1,1,0),NODRAW;
跌停:=IF(ST AND C=跌停价3,1,0) + IF(创业板 AND ST=0 AND C=跌停价2,1,0) + IF(科创板 AND C=跌停价2,1,0) + IF(ST=0 AND 创业板=0 AND 科创板=0 AND C=跌停价1,1,0),NODRAW;
一字跌停:=跌停=1 AND L=H;
昨一字跌停:=REF(一字跌停,1);
前一字跌停:=REF(一字跌停,2);
近3日一字跌停:=一字跌停 + 昨一字跌停 + 前一字跌停;
一字跌开:=(IF(ST AND O=跌停价3,1,0) + IF(创业板 AND ST=0 AND O=跌停价2,1,0) + IF(科创板 AND O=跌停价2,1,0) + IF(ST=0 AND 创业板=0 AND 科创板=0 AND O=跌停价1,1,0)) AND L<H AND C=L,NODRAW;
盘中跌停:=(IF(ST AND L=跌停价3,1,0) + IF(创业板 AND ST=0 AND L=跌停价2,1,0) + IF(科创板 AND L=跌停价2,1,0) + IF(ST=0 AND 创业板=0 AND 科创板=0 AND L=跌停价1,1,0)) AND C>L,NODRAW;
一字板:=涨停=1 AND L=H;
昨一字板:=REF(一字板,1);
前一字板:=REF(一字板,2);
近3日一字板:=一字板 + 昨一字板 + 前一字板;
一字涨开:=(IF(ST AND O=涨停价3,1,0) + IF(创业板 AND ST=0 AND O=涨停价2,1,0) + IF(科创板 AND O=涨停价2,1,0) + IF(ST=0 AND 创业板=0 AND 科创板=0 AND O=涨停价1,1,0)) AND L<H AND C=H,NODRAW;
盘中涨停:=(IF(ST AND H=涨停价3,1,0) + IF(创业板 AND ST=0 AND H=涨停价2,1,0) + IF(科创板 AND H=涨停价2,1,0) + IF(ST=0 AND 创业板=0 AND 科创板=0 AND H=涨停价1,1,0)) AND C<H,NODRAW;
M日一字跌停:=COUNT(一字跌停,M);
M日跌停:=COUNT(跌停,M);
总跌停次数:=COUNT(跌停,上市天数),NODRAW;
不跌停天数:=COUNT(跌停=0,上市天数);
连跌停:=IF(上市天数=1,1,IF(上市天数-不跌停天数=1,1,0));
M日一字板:=COUNT(一字板,M);
M日涨停:=COUNT(涨停,M);
总涨停次数:=COUNT(涨停,上市天数),NODRAW;
不涨停天数:=COUNT(涨停=0,上市天数);
STICKLINE(1,C,O,3,0),COLOR808080;
STICKLINE(1,L,H,0.1,0),COLOR808080;
A:=GPJYVALUE(2,1,0)+GPJYVALUE(2,2,0);
TJ:=A>0; {上龙虎榜}
{DRAWTEXT(TJ,LLV(L,30),VAR2STR(MONTH+DAY/100,2));}
DRAWTEXT(TJ,LLV(L,30),'榜'),COLORRED;
STICKLINE(TJ,LLV(L,30)*1.02,L,0.1,-1),COLORC0C0C0;
STICKLINE( 涨停,C,O,3,0),COLOR00FFFF;
STICKLINE( 跌停,C,O,3,0),COLORFF0080;
STICKLINE(TJ AND NOT(涨停 OR 跌停),C,O,3,0),COLORFFFFFF;
上榜副图源码如下:
买入:GPJYVALUE(2,1,0),COLORRED,NODRAW;
卖出:-GPJYVALUE(2,2,0),COLORGREEN,NODRAW;
净买入:买入+卖出,NODRAW;
A:=GPJYVALUE(2,1,0)+GPJYVALUE(2,2,0);
TJ:=A>0; {上龙虎榜}
0,COLORFF00FF;
STICKLINE(买入,0,买入,1,1),COLORRED;
STICKLINE(-卖出,0,-卖出,0.25,0),COLORGREEN;
{DRAWICON(TJ,买入/2,13);}
DRAWTEXT(TJ,MAX(买入,-卖出)*0.95,VAR2STR(MONTH+DAY/100,2));