所属地域:=STRCAT('所属地域:',DYBLOCK);
所属行业:=STRCAT('所属行业:',HYBLOCK);
所属概念:=STRCAT('所属概念:',GNBLOCK);
所属风格:=STRCAT('所属风格:',FGBLOCK);
DRAWTEXT_FIX(1,0.00,0.05,0,所属行业),COLORYELLOW;
DRAWTEXT_FIX(1,0.00,0.08,0,所属概念),COLORYELLOW;
DRAWTEXT_FIX(1,0.00,0.11,0,所属风格)COLORRED;
沪A涨家数:="999999$ADVANCE",COLORRED,NODRAW;
沪A跌家数:="999999$DECLINE",COLORGREEN,NODRAW;
深A涨家数:="399001$ADVANCE",COLORRED,NODRAW;
深A跌家数:="399001$DECLINE",COLORGREEN,NODRAW;
中小涨家数:="399005$ADVANCE",COLORRED,NODRAW;
中小跌家数:="399005$DECLINE",COLORGREEN,NODRAW;
创业涨家数:="399006$ADVANCE",COLORRED,NODRAW;
创业跌家数:="399006$DECLINE",COLORGREEN,NODRAW;
市场成本:=DMA(AMOUNT/(100*VOL),VOL/CAPITAL),COLORYELLOW,DOTLINE;
最新获利:=(C/市场成本-1)*100,NODRAW;
IF(CURRBARSCOUNT<=10,CONST(市场成本),DRAWNULL),COLORLIGRAY,DOTLINE;
DRAWTEXT(ISLASTBAR,市场成本*0.98,VARCAT(VARCAT(' ↖主力成本:',VAR2STR(市场成本,2)),'元'))COLORYELLOW;
DRAWTEXT(ISLASTBAR,市场成本*0.95,VARCAT(VARCAT(' 获利:',VAR2STR(最新获利,2)),'%'))COLORYELLOW;
牛熊线:=DMA(MA(CLOSE+REF(CLOSE,5)/CLOSE*0.098,90),VOL),LINETHICK1,CIRCLEDOT,COLORYELLOW;
小牛:=CROSS(C,牛熊线);
DRAWTEXT(小牛,L,'↖走强区'),COLORRED,LINETHICK4;
ZYG1:=IF(L=LLV(L,9),L,0);
ZYG2:=CONST(BARSLAST(ZYG1!=0));
ZYG3:=CONST(IF(ZYG2=0,H,REF(H,ZYG2)));
ZYG4:=CONST(REF(BARSLAST(H>ZYG3),ZYG2+1)+ZYG2+1);
ZYG5:=CONST(IF(ZYG4=0,H,REF(H,ZYG4)));
ZYG6:=CONST(REF(BARSLAST(H>ZYG5),ZYG4+1)+ZYG4+1);
ZYG7:=IF(CURRBARSCOUNT<=ZYG2+10,CONST(IF(ZYG6=0,H,REF(H,ZYG6))),DRAWNULL),COLORYELLOW,DOTLINE;
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
MA20:=MA(C,20);
趋势线:=MA(C,6);
大牛:=CROSS(趋势线,MA20);
死牛:=CROSS(MA20,趋势线);
DRAWTEXT(大牛,L,'↖行情开始'),COLORYELLOW;
DRAWTEXT(死牛,H,'↖行情结束'),COLORWHITE;
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME< 0.5,TOTAL,MTIME);
VVOL:=IF((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VOL*(TOTAL+3)/(CTIME+3),VOL);
最大涨幅:=IF((CODELIKE('300') OR CODELIKE('301') OR CODELIKE('688')),20,10);
涨停:=C>=ROUND2(REF(C,1)+REF(C,1)*最大涨幅/100,2) AND C=H;
板刀:=H>=(REF(C,1)+ROUND2(REF(C,1)*最大涨幅/100,2)) AND NOT(涨停);
DRAWTEXT(板刀,1.04*H,'板刀'),COLORYELLOW;
开盘涨停:=O>=ROUND2(REF(C,1)+REF(C,1)*最大涨幅/100,2);
一字板:=涨停 AND H=L;
跌停:=C<=ROUND2(REF(C,1)-REF(C,1)*最大涨幅/100,2) AND C=L;
开盘跌停:=O<=ROUND2(REF(C,1)-REF(C,1)*最大涨幅/100,2);
实体:=100*ABS(O-C)/REF(C,1);
涨幅:=100*(C-REF(C,1))/REF(C,1);
开盘涨幅:=100*(O-REF(C,1))/REF(C,1);
盘中跌停:=L<=ROUND2(REF(C,1)-REF(C,1)*最大涨幅/100,2);
去ST:=NAMELIKE('ST')=0 OR NAMELIKE('*ST')=0 OR NAMELIKE('SST')=0 OR NAMELIKE('S*ST')=0;
去除创业板1:=IF(CODELIKE('300'),0,1) ;
去除创业板2:=IF(CODELIKE('301'),0,1);
去除科创板:=IF(CODELIKE('688'),0,1);
去北交所:=IF(CODELIKE('87'),1,0) OR IF(CODELIKE('83'),1,0) OR IF(CODELIKE('43'),1,0);
跌停高开:=(O>=REF(C,1) AND C>O AND REF(盘中跌停,1));
DRAWTEXT(跌停高开,0.98*L,'高开'),COLORYELLOW;
判断位置:IF(C<=(HHV(C,250)-LLV(C,250))/3+LLV(C,250),1,IF(C<=(HHV(C,250)-LLV(C,250))*2/3+LLV(C,250),2,3)),NODRAW;
ZT:=IF(CODELIKE('68') OR CODELIKE('30'),ZTPRICE(REF(C,1),0.2),IF(CODELIKE('8'),ZTPRICE(REF(C,1),0.3),IF((NAMELIKE('ST') OR NAMELIKE('*')),ZTPRICE(REF(C,1),0.05),ZTPRICE(REF(C,1),0.1))));
STICKLINE(C=ZT,O,C,0.8,0),COLORYELLOW;
TS:=BARSCOUNT(CLOSE)>=20;
短1:=EMA((3*CLOSE+HIGH+LOW+OPEN)/6,5),COLOR0080FF,LINETHICK2;
长1:=EMA((3*CLOSE+HIGH+LOW+OPEN)/6,20),COLORBLUE,LINETHICK2;
NOTEXTA1:EMA(短1-长1,5)+长1,LINETHICK2,COLORBLUE;
NOTEXTA2:HHV(NOTEXTA1,5),LINETHICK2,COLORGREEN;
NOTEXTA3:NOTEXTA1-(NOTEXTA2-NOTEXTA1),LINETHICK2,COLORRED;
NOTEXTA4:IF(NOTEXTA2>NOTEXTA1,NOTEXTA1-(NOTEXTA2-NOTEXTA1),DRAWNULL),LINETHICK2,COLORYELLOW;
三线:=NOTEXTA2=NOTEXTA3 AND REF(NOTEXTA2,1)>REF(NOTEXTA3,1);
操盘线:NOTEXTA3,NODRAW;
三线后N天内:=BARSLAST(三线) <=9;
高量过前55:=V=HHV(V,6);
买点:=FILTER(TS AND C>=O AND NOTEXTA2=NOTEXTA3 AND 三线后N天内 AND 高量过前55 ,9),NODRAW;
DRAWICON(买点,H*1.03,25);
当日均价:=AMOUNT/(V*100);
假阴:=(C<=O AND 当日均价>REF(C,1)) OR ( C<=O AND C>REF(C,1));
第一天:=C< O AND V>REF(V,1) AND NOT(跌停);
第二天:=C>O AND NOT(涨停);
第三天:=C< O;
第四天:=C>O;
第一种情况:=第四天 AND REF(第三天,1) AND REF(第二天,2) AND REF(第一天,3);
第二种情况:=假阴 AND REF(第二天,1) AND REF(第一天,2);
企稳:=(第一种情况 OR 第二种情况);
DRAWTEXT(企稳,1.02*H,'企稳'),COLORYELLOW;
中间价:(H-L)/2+L,NODRAW;
回到昨天中价:C-REF(中间价,1),NODRAW;
实体Z:100*(C-O)/REF(C,1),NODRAW;
极端2:=REF(C,1)>=REF(O,1) AND C< O AND BETWEEN(实体,4,8) AND EVERY(操盘线>REF(操盘线,1),3) AND 涨幅< -4 AND COUNT(涨停,2)=1 AND 回到昨天中价<=0 AND 判断位置<=2;
DRAWTEXT(极端2,0.96*L,'大杀'),COLORRED;
DRAWTEXT(REF(极端2,1) AND 操盘线>=REF(操盘线,1),0.96*L,'大买'),COLORYELLOW;
STICKLINE(涨停,CLOSE,OPEN,3,0),COLORFF7700;
STICKLINE(涨停,CLOSE,OPEN,2.2,0),COLORFF9900;
STICKLINE(涨停,CLOSE,OPEN,1.5,0),COLORFFBB00;
STICKLINE(涨停,CLOSE,OPEN,0.5,0),COLORCYAN;
STICKLINE(涨停,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(涨停,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(涨停,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(涨停,(C+H)/2,(C+H)/2,0.5,0),COLORWHITE;
DRAWNUMBER(极端2,(O+C)/2,100*(O-C)/REF(C,1)),COLORFF00FF;
DRAWNUMBER(REF(极端2,1) AND 操盘线>=REF(操盘线,1),(O+C)/2,ROUND2(100*(REF(C,2)-O)/REF(C,2),1)),COLORFF00FF;
DRAWTEXT(REF(REF(极端2,1) AND 操盘线>=REF(操盘线,1),1) AND O>REF(C,1),0.98*L,'高开'),COLORYELLOW;
封单额:=IF(FINANCE(3)=0,DRAWNULL,IF(GPJYVALUE(15,1,0)=2,GPJYVALUE(15,2,0),0)),NODRAW;
封单量:封单额*100/C,NODRAW;
自由流通:=FINANCE(46)/100,NODRAW;
封成比:(封单量/V)*100,NODRAW;
年线:=MA(C,250);
JJJ:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));
DDD:=(DYNAINFO(5)< 0.01 || DYNAINFO(6)< 0.01);
JJJT:=IF(DDD,1,(JJJ< (DYNAINFO(5)+0.01) AND JJJ>(DYNAINFO(6)-0.01)));
CYC∞:=IF(JJJT,DMA(AMOUNT/(100*VOL),100*VOL/FINANCE(7)),EMA((HIGH+LOW+2*CLOSE)/4,120)),NODRAW;
MTM:=C-REF(C,1);
DRAWTEXT_FIX(C>O,0,0.07,0,'更多实用指标公式,请关注微信公众号:金钻指标精选'),COLORWHITE;
ZLGJ:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买入:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ< 0,2) AND CROSS(ZLGJ,MA(ZLGJ,2)),1,0);
DRAWICON(FILTER(买入=1,2),LOW*0.97,7),COLORRED;
潜龙线:=EMA(C,13);
高量过前5:=C>O AND (V>2*REF(MA(V,5),1) OR V>=2*REF(V,1)) AND C>潜龙线 AND V>=HHV(V,6);
倍量:=TFILTER(高量过前5,C< O AND H< REF(H,1),1);
位置要求:=L/EMA(C,13)< 1.05;
K线实体:=ABS(C-O)/REF(C,1);
SPX0:=H/REF(C,1)>=1.05 AND H>=HHV(H,6) AND 高量过前5 AND H/C>1.005 AND C/REF(C,1)>1.015 AND 位置要求 AND K线实体>0.01 AND FINANCE(3)=1;
SPX1:=H/REF(C,1)>=1.06 AND H>=HHV(H,6) AND 高量过前5 AND H/C>1.005 AND C/REF(C,1)>1.015 AND 位置要求 AND K线实体>0.02 AND FINANCE(3)=3;
SPX2:=SPX0 OR SPX1;
SPX3:=SPX2 AND REF(COUNT(SPX2,5)=0,1);
试盘K:=FILTER(SPX3,5);
试盘周期:=BARSLAST(试盘K);
关注3:=REF(试盘K,试盘周期) AND 试盘周期>=1 AND 试盘周期<=5;
STICKLINE(试盘K,H,L,0,0),COLORFF55FF;
STICKLINE(试盘K,C,O,3,0),COLOR880088;
STICKLINE(试盘K,C,O,2.6,0),COLORAA00AA;
STICKLINE(试盘K,C,O,1.9,0),COLORCC00CC;
STICKLINE(试盘K,C,O,1.1,0),COLOREE00EE;
洗盘不破:=COUNT(EMA(C,13)< REF(EMA(C,13),1),试盘周期)< 2;
震仓K0:=COUNT(试盘K,10)>=1 AND H< HHV(H,试盘周期+1) AND C>=EMA(C,13) AND L<=REF(C,试盘周期) AND C< O AND COUNT(C< O AND H< REF(H,1),试盘周期)< 2 AND VVOL< REF(V,试盘周期) AND 试盘周期< 4;
震仓K:=TFILTER(震仓K0,试盘K,1);
DRAWTEXT(震仓K,1.01*H,'↙震仓K'),COLORWHITE;
震仓周期:=BARSLAST(震仓K);
KK1:=SUMBARS(震仓K,1);
KK2:=SUMBARS(试盘K,1);
STICKLINE(KK1< 10 AND KK2<=14,REF(H,震仓周期),REF(H,震仓周期),3.1,0),COLORWHITE;
起爆K0:=REF(COUNT(试盘K,7)>=1,3) AND C>=REF(H,震仓周期) AND L< REF(H,震仓周期) AND REF(COUNT(震仓K,试盘周期)>=1,1) AND C>O AND 洗盘不破 AND (H-C)/(C-O)< 1 AND COUNT(C>REF(H,震仓周期),震仓周期)=1 AND 试盘周期< 8;
起爆K1:=REF(COUNT(试盘K,8)>=1,2) AND EVERY(C>=EMA(C,13),试盘周期) AND C>REF(H,震仓周期) AND O< REF(H,震仓周期) AND REF(COUNT(震仓K,试盘周期)>=1,1) AND 涨停 AND COUNT(涨停,10)=1;
起爆K3:=起爆K0 OR 起爆K1;
起爆K:=FILTER(起爆K3,5);
DRAWTEXT(FILTER(起爆K,10),L*0.98,'↖起爆K'),COLORWHITE;
STICKLINE(起爆K,O,C,3.1,0),COLOR00AAFF;
STICKLINE(起爆K,O,C,2.1,0),COLOR00BBFF;
STICKLINE(起爆K,O,C,1.5,0),COLOR00CCFF;
STICKLINE(起爆K,O,C,1,0),COLOR00DDFF;
STICKLINE(起爆K,O,C,0.6,0),COLOR00EEFF;
STICKLINE(起爆K,O,C,0.2,0),COLOR00FFFF;
STICKLINE(FILTER(起爆K,5),O,L,0,0),COLORFFFFFF;
STICKLINE(FILTER(起爆K,5),O,MAX(O,REF(H,震仓周期)),3.1,0),COLOR555555;
STICKLINE(FILTER(起爆K,5),O,MAX(O,REF(H,震仓周期)),2.6,0),COLOR777777;
STICKLINE(FILTER(起爆K,5),O,MAX(O,REF(H,震仓周期)),1.9,0),COLOR999999;
STICKLINE(FILTER(起爆K,5),O,MAX(O,REF(H,震仓周期)),1.1,0),COLORCCCCCC;
起涨K0:=H>REF(H,震仓周期) AND H/REF(C,1)>1.03 AND C>O AND COUNT(试盘K,10)>=1 AND COUNT(震仓K,试盘周期)>=1 AND C< REF(H,震仓周期) AND COUNT(起爆K,试盘周期)=0;
起涨K1:=REF(COUNT(试盘K,1)>=1,1) AND C>O AND C< REF(H,1) AND C>REF(C,1) AND H< REF(H,1);
起涨K2:=起涨K0 OR 起涨K1;
起涨K:=FILTER(起涨K2,5);
STICKLINE(起涨K,H,L,0,0),COLOR0000FF;
STICKLINE(起涨K,C,O,3.1,0),COLOR000099;
STICKLINE(起涨K,C,O,2,0),COLOR0000BB;
STICKLINE(起涨K,C,O,1,0),COLOR0000DD;
起涨周期:=BARSLAST(起涨K);
DRAWTEXT(起涨K,1.02*H,'↖起涨K'),COLORWHITE;
DRAWTEXT(试盘K AND NOT(起爆K),1.01*H,'试盘K'),COLORWHITE;
单个涨停:=NOT(涨停) AND REF(涨停,1) AND COUNT(涨停,3)=1 AND COUNT(一字板,3)=0 AND V>REF(V,1) AND H>O;
TT0:=BARSLAST(单个涨停);
低点0:=REF(L,TT0);
K1:=L< 低点0 AND COUNT(L< 低点0,TT0)=1 AND TT0<=3 AND C>REF(L,TT0+1);
TT1:=BARSLAST(K1);
低点1:=REF(L,TT1);
K2:=L< 低点1 AND COUNT(L< 低点1,TT1)=1 AND TT1<=3 AND C>REF(L,TT0+1);
TT2:=BARSLAST(K2);
低点2:=REF(L,TT2);
K31:=L< 低点2 AND COUNT(L< 低点2,TT2)=1 AND TT2<=3 AND C>REF(L,TT0+1) AND (C>=REF(C,1) OR C>=O) AND V< MA(V,5) AND V< 0.6*REF(V,TT0) AND TT0<=8 AND V<=LLV(V,TT0);
TT31:=BARSLAST(K31);
K320:=L< 低点2 AND COUNT(L< 低点2,TT2)=1 AND TT2<=3 AND C>REF(L,TT0+1) AND (C< REF(C,1) AND C< O) AND V< REF(V,1) AND V< MA(V,5) AND TT0<=8 ;
TT320:=BARSLAST(K320);
K32:=FILTER(REF(K320,TT320) AND COUNT(C>=REF(C,1),TT320)=1 AND TT320<=6 AND TT320>=1 AND V< MA(V,5),6) AND TT0<=8;
TT32:=BARSLAST(K32);
DRAWTEXT(K31 OR K32,0.97*L,'打底');
加仓1:=REF(K31,TT31) AND FILTER(VVOL>MA(V,5) AND C>=O AND C>=REF(C,1) AND TT31<=6 AND TT31>=1 AND C>REF(C,1),5);
加仓2:=REF(K32,TT32) AND FILTER(VVOL>MA(V,5) AND C>=O AND C>=REF(C,1) AND TT32<=6 AND TT32>=1 AND C>REF(C,1),5);
加仓:=(加仓1 OR 加仓2);
DRAWTEXT(加仓,0.97*L,'加仓');
MA5:=MA(C,5);
MA10:=MA(C,10);
MA60:=MA(CLOSE,60);
均线多头:=MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND MA20>REF(MA20,1) AND MA5>MA10 AND MA10>MA20 AND MA20>MA60;
趋势形成:=COUNT(均线多头,3)=3 AND COUNT(C>O,5)=5;
首阴:=REF(趋势形成,1) AND C< O AND C>=MA10 AND V< REF(V,1) AND 判断位置=1;
反包:=REF(首阴,1) AND C>REF(C,1);
DRAWTEXT(反包,1.05*H,'反包');