「翔博精选指标」嘿马精准线
2022-03-22原创 编 辑:翔博软件
黑马精准线
顶底开关:=1;
点位差:=1;
指定点:=10;
DRAWGBK(O>0,RGB(33,47,58),RGB(0,0,0),0,'02',0);
{标缺口}
LL:=REF(L,1);HH:=REF(H,1);上跳:=L>HH;下跳:=H<LL;
STICKLINE(L>REF(H,1),L,REF(H,1),3.1,-1),COLORRED;
STICKLINE(REF(L,1)>H,REF(L,1),H,3.1,-1),COLORGREEN;
{灰色}
STICKLINE(O>=C,H,L,0,0),COLOR909090;
STICKLINE(O>=C,C,O,3.1,0),COLOR606060;
STICKLINE(O>=C,C,O,2.1,0),COLOR707070;
STICKLINE(O>=C,C,O,1.2,0),COLOR808080;
STICKLINE(O>=C,C,O,0.2,0),COLOR909090;
STICKLINE(O<=C,H,L,0,0),COLOR666B6F;
STICKLINE(C>O,C,O,3.1,1),COLOR666B6F;
V2V:=V/REF(V,1)>=1.9 AND C>REF(C,1);
{金黄色}
STICKLINE(V2V,H,L,0,0),COLORYELLOW;
STICKLINE(V2V,O,C,3.1,0),COLOR0033FF;
STICKLINE(V2V,O,C,2.1,0),COLOR0077FF;
STICKLINE(V2V,O,C,1.1,0),COLOR00BBFF;
STICKLINE(V2V,O,C,0.1,0),COLOR00FFFF;
{涨停粉}
ZT:=C/REF(C,1)>1.097;
ZT数:COUNT(ZT,BARSSINCE(ZT)),NODRAW;
{涨停红色}
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF>9.5,C,O,3.1,0),COLOR0000CC;
STICKLINE(ZDF>9.5,C,O,2.1,0),COLOR0000DD;
STICKLINE(ZDF>9.5,C,O,1.2,0),COLOR0000EE;
STICKLINE(ZDF>9.5,C,O,0.2,0),COLOR0000FF;
STICKLINE(ZDF>9.5,H,L,0,0),COLOR0000FF;
{跌停绿色}
STICKLINE(ZDF<-9.9,O,C,3.1,0),COLOR66CC66;
STICKLINE(ZDF<-9.9,O,C,2.1,0),COLOR77DD77;
STICKLINE(ZDF<-9.9,O,C,1.2,0),COLOR88EE88;
STICKLINE(ZDF<-9.9,O,C,0.2,0),COLOR99FF99;
STICKLINE(ZDF<-9.5,H,L,0,0),COLOR99FF99;
均价:=AMO/VOL/100;
假阴真阳:=C<O AND C>=REF(MIN(C,O),1) AND 均价>REF(均价,1);
{蓝}
DT:=假阴真阳;
STICKLINE(DT,H,L,0,0),COLORFFAA00;
STICKLINE(DT,O,C,3,0),COLORFF3300;
STICKLINE(DT,O,C,2,0),COLORFF7700;
STICKLINE(DT,O,C,1,0),COLORFFAA00;
STICKLINE(DT,O,C,0.1,0),COLORFFFF00;
YX:=REF(O,BARSLAST(假阴真阳));
假阴实顶:YX,COLORFF7700,NODRAW;
STICKLINE(V,YX,YX,1,0),COLORFF7700;
L0:=点位差/100;
前极点精准线:IF(顶底开关=0,CONST(REF(L,指定点)),CONST(REF(H,指定点))),COLOR178448;
DRAWICON(ABS(L-前极点精准线)<=L0,前极点精准线*0.99,38);
DRAWICON(ABS(H-前极点精准线)<=L0,前极点精准线*1.01,39);
{H极点精准线:CONST(REF(H,指定点)),COLOR7777FF;
DRAWICON(ABS(H极点精准线-H)<=L0,H极点精准线*1.01,35);
DRAWICON(ABS(H极点精准线-L)<=L0,H极点精准线*0.99,34);}
{极点精准线:CONST(L),COLOR0077FF;
DRAWICON(ABS(L-极点精准线)<=L0,极点精准线*0.99,1);
DRAWICON(ABS(H-极点精准线)<=L0,极点精准线*1.01,2);
同向极点精准数:COUNT(ABS(L-极点精准线)<=L0,60)-1,COLOR0077FF,NODRAW;
异向极点精准数:COUNT(ABS(H-极点精准线)<=L0,60),COLOR0077FF,NODRAW;
XG:=同向极点精准数>0 AND 异向极点精准数>0;}
DIFF:=10*(EMA(CLOSE,12)-EMA(CLOSE,26));
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
量缩价涨:=C<REF(O,1) AND V<REF(V,1) AND MACD>REF(MACD,1) AND C>REF(C,1) AND REF(C<O,1) AND C>O;
阴KDAY:=BARSLAST(量缩价涨)+1;
STICKLINE(V,REF(O,阴KDAY),REF(O,阴KDAY),3.5,0),COLORMAGENTA;
DRAWICON(CROSS(C,REF(O,阴KDAY)),L,1);
DRAWTEXT_FIX(ISLASTBAR,0.55,0.01,0,CODE),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.55,0.05,0,STKNAME)COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.05,0,HYBLOCK),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR,0.6,0,0,DYBLOCK),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR,0.55,0.85,0,GNBLOCK),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.55,0.90,0,FGBLOCK),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.55,0.95,0,ZSBLOCK);
金叉:=CROSS(EMA(C,1),EMA(C,3));
XXBB:= EMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*4,5)*100;
抄牛底:=REF(XXBB,1)<50 AND XXBB-REF(XXBB,1)>25;
蓝宝石:=抄牛底 AND 金叉;
追拉升:=REF(XXBB,1)>50 AND XXBB-REF(XXBB,1)>40;
{机构增仓}
JA1:=(VOL/C)/2;
A2:=SUM(IF(JA1>100 AND CLOSE>REF(CLOSE,1),JA1,0),0);
A3:=SUM(IF(JA1>100 AND CLOSE<REF(CLOSE,1),JA1,0),0);
A4:=SUM(IF(JA1<100 AND CLOSE>REF(CLOSE,1),JA1,0),0);
A5:=SUM(IF(JA1<100 AND CLOSE<REF(CLOSE,1),JA1,0),0);
A6:=A2+A3+A4+A5;
机买:=(A2/A6)*100;
机卖:=(A3/A6)*100;
主力差:=机买-机卖;
机构加仓:=(主力差>=REF(主力差,1)+1.5)*50 AND 机买>机卖;
机构抄底:=金叉 AND 机构加仓;
DRAWTEXT (机构抄底,L*0.97,'↖机构入驻'),COLORCYAN;
机构追买:=机构加仓 AND 追拉升;
DRAWTEXT (机构追买,L*0.99,'↖机构吃单'),COLORFF00FF;
{均线粘合}
JDIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
JDEA:=EMA(JDIF,9);
JMACD:=(JDIF-JDEA)*2;
JBOLL:=MA(CLOSE,20);
JUPPER:=JBOLL+2*STD(CLOSE,20);
JLOWER:=JBOLL-2*STD(CLOSE,20);
JK1:=CLOSE>OPEN ;
JK2:=VOL>=2*REF(VOL,1);
JK3:=CROSS(JDIF,JDEA) AND JDIF<=0 ;
JK4:=CROSS(CLOSE,JBOLL);
均线粘合:=JK1 AND JK2 AND JK3 AND JK4 ;
机构拉升:=机构加仓 AND 均线粘合;
DRAWTEXT (机构拉升,L*0.97,'↖机构拉升'),COLORFF00FF;
HZ:=EMA(CLOSE,13);
短波:=EMA(HZ,1);
HZ2:=EMA(HZ,8);
拉升一号:=CROSS(短波,HZ2);
DRAWTEXT (拉升一号,L*0.97,'↖黑马拉升'),COLORFF00FF;
{洗盘杀入}
N:=13;
T1W:=CONST(LLVBARS(LOW,N));
T1HIGH:=CONST(REF(HIGH,T1W));
CC:=CONST(CURRBARSCOUNT);
T2:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T1W)) AND (HIGH>T1HIGH)));
T2HIGH:=CONST(REF(HIGH,T2));
T3:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T2)) AND (HIGH>T2HIGH)));
T3HIGH:=CONST(REF(HIGH,T3));
洗盘杀入线:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),LINETHICK2 COLORWHITE;
DRAWTEXT(ISLASTBAR, T3HIGH, ' 洗盘杀入线')LINETHICK1,COLORWHITE;
{DRAWNUMBER(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95);}{显示数字}
止损点:=(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95);
DRAWTEXT(ISLASTBAR ,止损点,'牛熊线');
止损价:STICKLINE(ISLASTBAR,HHV(C,5)*0.95,HHV(C,5)*0.95,20,2)LINETHICK1;
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
流通盘:=STRCAT(STRCAT(' 流通盘: ',CON2STR(CAPITAL/1000000,2)),'亿');
全流通:=STRCAT(' 全流通: ',CON2STR((CAPITAL/1000000)/(TOTALCAPITAL/1000000),2));
市值:=STRCAT(STRCAT(' 流通市值: ',CON2STR((CAPITAL/1000000)*C,2)),'亿');
上市日期:=STRCAT(' 上市日期: ',CON2STR(FINANCE(42),0));
股本市值:=STRCAT('股本市值: ',STRCAT(STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值),上市日期));
市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2));
市销率:=STRCAT(' 市销率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));
市净率:=STRCAT(' 市净率: ',CON2STR(C/FINANCE(34),2));
净资收益率:=STRCAT(' 净资收益率: ',CON2STR(FINANCE(33)/FINANCE(34)*100,2));
毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));
净利润率:=STRCAT(' 净利润率 ',CON2STR(FINANCE(30)/FINANCE(20)*100,2));
主营利润率:=STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
当前业绩:=STRCAT('当前业绩: ',STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(市盈率,市销率),市净率),净资收益率),毛利率),净利润率),主营利润率));
X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};
X3:=FINANCE(23)/FINANCE(10)*3.3;
X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
X5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=X1+X2+X3+X4+X5;
预警:=IF(Z值<1.2,'重警',IF(Z值>=1.2 AND Z值<2.6,'轻警','无警'));
财务预警:=STRCAT('财务预警: ',STRCAT(预警,STRCAT('-Z值: ',CON2STR(Z值,3))));
优质资产率:=STRCAT(' 优质资产率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));{理论上越大越好但不同行业有不同标准};
现金负债比:=STRCAT(' 现金负债比: ',CON2STR(FINANCE(25)/FINANCE(15),3));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};
财务系数:=STRCAT('风险系数: ',STRCAT(STRCAT(财务预警,优质资产率),现金负债比));
DRAWTEXT_FIX(ISLASTBAR,0.005,0.01,0,财务系数),COLOR888888;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.06,0,当前业绩),COLOR888888;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.115,0,股本市值),COLOR888888;
STICKLINE(CURRBARSCOUNT<=200 AND C/REF(C,1)>=1.095 ,(L+H)/2,(L+H)/2,2,0),COLORMAGENTA;
TY1:=HIGH;
HD1:=FILTER(BACKSET(FILTER(REF(TY1,X)=HHV(TY1,2*X+1),X),X+1),X);
LD1:=FILTER(BACKSET(FILTER(REF(TY1,X)=LLV(TY1,2*X+1),X),X+1),X);
DRAWNUMBER(HD1,REF(HIGH,HD1-1)*1.03,HIGH),COLORGREEN;
DRAWNUMBER(LD1,REF(LOW,LD1-1)*0.98,LOW),COLOR00EEFF;
GK:=LOW>REF(HIGH,1);
DK:=HIGH<REF(LOW,1);
DRAWNUMBER(GK,LOW,(LOW-REF(HIGH,1))/REF(CLOSE,1)*100),COLOR0000FF;
DRAWNUMBER(DK,HIGH,(REF(LOW,1)-HIGH)/REF(CLOSE,1)*100),COLOR00FF00;
{牛熊通吃}
AA1:=AMOUNT/V;
BB1:=L<AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L<MA(C,5)*0.921;
EE1:=V<MA(V,5)*1.5;
FF1:=BB1 AND CC1 AND DD1 AND EE1;
DRAWTEXT(FF1,LOW*0.99,'老鼠仓'),COLOR4080FF;
{预测明天}
XXS:=MA(LOW,5)*(1-5/100);
XXS1:=MA(HIGH,5)*(1+5/100);
均线:=C,COLORGREEN;
AAAA:=CLOSE/REF(CLOSE,3)<=0.85 AND CROSS(C,XXS) AND C>REF(C,1),LINETHICK0 ;
DRAWTEXT(AAAA,L*0.95,'下影买'),COLORRED;
BBAA:=CROSS(XXS1,C);
DRAWTEXT(CROSS(XXS1,C),H,'开盘逃'),COLORWHITE;
DDDD:=CROSS(C,XXS1);
DRAWTEXT(DDDD,H,'明日走'),COLORYELLOW;
{兄弟指标}
AAA:=MA(LOW,5)*(1-5/100);
BBB:=(HHV(AAA,5)+LLV(AAA,5))/2;
DRAWTEXT(CROSS(BBB,L) AND BBB>REF(BBB,1),L*0.98,'←兄弟回马枪'),COLORWHITE;
{天河指标}
DIFL:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEAL:=EMA(DIFL,9);
DRAWTEXT(REF(CROSS(DEAL,DIFL),1) AND CROSS(DIFL,DEAL),L*0.97,'←天河回马抢'),COLORMAGENTA;
{见好就收}
VSR2:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VSR3:=SMA(VSR2,4,1);
VSR4:=SMA(VSR3,2,1);
DRAWTEXT(VSR4>82 AND VSR3>89,HHV(C,30)*1.02,'收'),COLORGREEN;
三连阴:=LAST(C<O,3,0);
三缩量:=LAST(VOL<REF(VOL,1),3,0);
选股1:=REF(三连阴,1)>0 AND REF(三缩量,1)>0 AND O<C;
DRAWTEXT(选股1,L*0.98,'▲一三买入法'),COLORRED;
H01:='【解禁时间】: ';
H02:=EXTERNSTR(0,7000);
DRAWTEXT_FIX(ISLASTBAR,0,1,0,STRCAT(H01,H02)),COLORYELLOW;
H03:='【质押比例%】: ';
H04:=EXTERNSTR(0,7001);
DRAWTEXT_FIX(ISLASTBAR,0,0.9,0,STRCAT(H03,H04)),COLORYELLOW;
巨量平台:REF(H,BARSLAST(V=HHV(VOL,120))),COLORYELLOW,LINETHICK1;