通达信庄子捉妖记主图指标 源码 贴图
2021-08-20 09:11:00来源:本站整理浏览:746
通达信庄子捉妖记主图指标 源码 贴图
DRAWGBK(C>0,RGB(0,0,0),RGB(00,0,0),0,'BJT1',0);
DRAWKLINE(H,O,L,C);
{以下是主题特色参数}
N:=100;
高1:=REFDATE(HHV(H,N),DATE);
低1:=REFDATE(LLV(L,N),DATE);
H3:=高1-(高1-低1)*0.5;
DRAWTEXT_FIX(1,0.51,0.3,0,'公式网WWW.GPXIAZAI.COM'),COLORFFFF00;
DRAWTEXT_FIX(1,0,0.3,0,'周期版'),COLORFFFF00;
分水岭:REFDATE(H3,DATE),COLORLIMAGENTA,DOTLINE;
DRAWNUMBER(ISLASTBAR,分水岭,分水岭),COLORWHITE;
月:REF(O,BARSLAST(MONTH!=REF(MONTH,1))),COLORFFFF00,NODRAW,LINETHICK6;
STICKLINE(C>月,月,月,5,0),COLORRED;
STICKLINE(C<月,月,月,5,0),COLORFFFF00;
STICKLINE(C=月,月,月,5,0),COLORWHITE;
高量线:=V=HHV(V,20) AND H=HHV(H,20),NODRAW;
DRAWLINE(高量线,MAX(C,O),REF(高量线,1),REF(MAX(C,O),1),1),COLORYELLOW,LINETHICK2;
MA20PY:REF(MA(C,20),13),DOTLINE,COLORLIGRAY;
现价:REFDATE(C,DATE),DOTLINE,COLORLIGRAY;
振幅:(C-REF(C,1))/REF(C,1)*100,NODRAW,COLORCCCCFF;
WIN:WINNER(C)*100,NODRAW,COLORRED;
TM:=1200823;
涨停:IF(DATE<TM,ZTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED;
跌停:IF(DATE<TM,DTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN;
明涨停:IF(DATE<TM,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA;
明跌停:IF(DATE<TM,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00;
ZT:=C=涨停 AND PERIOD=5 AND H=C;
ZT1:=H=涨停 AND PERIOD=5 AND H>C;
DT:=C=跌停 AND PERIOD=5 AND L=C;
DT1:=L=跌停 AND PERIOD=5 AND L<C;
{涨停K线颜色设置}
STICKLINE(ZT,C,(O+C)/2,3,0),COLOR000099;
STICKLINE(ZT,C,(O+C)/2,2.2,0),COLOR0000CC;
STICKLINE(ZT,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT,C,(O+C)/2,0.5,0),COLORCC66FF;
STICKLINE(ZT,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(ZT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(ZT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(DT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,C,(O+C)/2,3,0),COLOR009900;
STICKLINE(DT,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT,C,(O+C)/2,1.5,0),COLOR00DD00;
STICKLINE(DT,C,(O+C)/2,0.5,0),COLOR00FF00;
{曾涨跌停打开K线颜色设置}
STICKLINE(ZT1,C,(O+C)/2,3,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,2.2,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT1,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(ZT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT1,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT1,O,(O+C)/2,3,0),COLOR888888;
STICKLINE(DT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT1,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT1,C,(O+C)/2,3,0),COLOR009900;
STICKLINE(DT1,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT1,C,(O+C)/2,1.5,0),COLOR00DD00;
STICKLINE(DT1,C,(O+C)/2,0.5,0),COLOR00FF00;
DRAWTEXT(ZT AND DT1 AND PERIOD=5,L-0.03,'地天板'),COLORCC00CC;{从跌停到涨停}
DRAWTEXT(DT AND ZT1 AND PERIOD=5,H+0.03,'天地板'),COLOR00CC00;{从涨停到跌停};
DRAWTEXT(DT1,L-0.09,'撬板'),COLORCC00CC;{从涨停到跌停};
DRAWTEXT(ZT1,H+0.03,'炸板'),COLOR00CC00;{从涨停到跌停};
半分:(O+C)/2,NODRAW,COLORWHITE;
高:=REF(HHV(H,72),5);
龙门:REFDATE(高,DATE),COLORWHITE,LINETHICK2;
封成比:IF(涨停,DYNAINFO(58)/DYNAINFO(8),0),NODRAW,COLORYELLOW;
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0.55,0.9,0,STRCAT(Z3,GNBLOCK)),COLORWHITE;
板块所属:DRAWTEXT_FIX(1,0,0,0,'板块所属:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.06,0,0,FGBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0,0.9,0,STRCAT('跟庄概念: ',ZDBLOCK)),COLORFFFF00;
XA_1:=CLOSE*VOL;
XA_2:=EMA((EMA(XA_1,3)/EMA(VOL,3)+EMA(XA_1,6)/EMA(VOL,6)+EMA(XA_1,12)/EMA(VOL,12)+EMA(XA_1,24)/EMA(VOL,24))/4,13);
XA_3:=EMA(CLOSE,9);
妖线:=EMA(XA_3*1.11,5),COLORLIMAGENTA,LINETHICK2;
XA_4:=CLOSE*VOL;
XA_5:=EMA((EXPMA(XA_4,3)/EXPMA(VOL,3)+EXPMA(XA_4,6)/EXPMA(VOL,6)+EXPMA(XA_4,12)/EXPMA(VOL,12)+EXPMA(XA_4,24)/EXPMA(VOL,24))/4,13);
XA_6:=1.13*XA_5;
XA_7:=MA(HIGH,30)*(1+15/100);
XA_8:=CROSS(CLOSE,妖线) AND CLOSE>=REF(CLOSE,1)*1.048;
DRAWICON(CROSS(CLOSE,妖线),LOW*0.99,13);
XA_9:=CROSS(CLOSE,XA_6) AND CLOSE>=REF(CLOSE,1)*1.048;
XA_10:=CROSS(CLOSE,XA_7) AND CLOSE>=REF(CLOSE,1)*1.048;
XA_11:=MA(CLOSE,20);{WWW.GPXIAZAI.COM}
STICKLINE(CLOSE/REF(CLOSE,1)>=1.09,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>=0.049 AND (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)<0.098,CLOSE,OPEN,2,0),COLORMAGENTA;
XA_12:=MA(CLOSE,5);
XA_13:=MA(CLOSE,8);
XA_14:=MA(CLOSE,13);
XA_15:=MA(CLOSE,21);
XA_16:=MA(CLOSE,34);
XA_17:=MA(CLOSE,50);
XA_18:=OPEN<=XA_12 AND CLOSE>XA_12;
XA_19:=OPEN<=XA_13 AND CLOSE>XA_13;
XA_20:=OPEN<=XA_14 AND CLOSE>XA_14;
XA_21:=OPEN<=XA_15 AND CLOSE>XA_15;
XA_22:=OPEN<=XA_16 AND CLOSE>XA_16;
XA_23:=OPEN<=XA_17 AND CLOSE>XA_17;
XA_24:=XA_18+XA_19+XA_20+XA_21+XA_22+XA_23>4;
XA_25:=CLOSE>OPEN AND CLOSE>REF(CLOSE,1)*1.03 AND CLOSE=HIGH AND XA_24;
DRAWICON(XA_25,LOW*0.98,30);
STICKLINE(XA_25,CLOSE,OPEN,2,0),COLORYELLOW;
STICKLINE(XA_25,CLOSE,OPEN,1.5,0),COLORRED;
STICKLINE(XA_25,CLOSE,LOW,0.02,0),COLORBLACK;
STICKLINE(XA_25,OPEN,LOW,0,0),COLORGREEN;
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
DK:=2*(S2-S6);
主力成本:=EMA(X,13),LINETHICK1,COLORLIGRAY;
DRAWICON(CROSS(妖线,MA20PY),L,10);
主力线:EMA(COST(90),10),COLORRED,LINETHICK4,POINTDOT;
MA50:=MA(CLOSE,50),COLORYELLOW,LINETHICK4,POINTDOT;
趋势线:((EMA(C,34)+EMA(C,77))/2)*1.2,COLORWHITE,LINETHICK2;
假阴:=REF(C>O,1) AND AMOUNT/V/100>REF(C,1) AND C<O;
假阳:=REF(C<O,1) AND H<REF(O,1) AND C<(REF(O-C,1))/3+REF(C,1) AND AMOUNT/V/100<REF(C,1) AND C>O;
乾坤眼:=(C>O AND REF(C,1)<REF(O,1) AND REF(C,2)<REF(O,2) AND C>REF(C,2)AND V<REF(V,2)&&REF(V,1)<REF(V,2)),COLORYELLOW;
STICKLINE(乾坤眼,O,C,3,0),COLOR000099;
STICKLINE(乾坤眼,O,C,2.2,0),COLOR0000CC;
STICKLINE(乾坤眼,O,C,1.5,0),COLOR0000FF;
STICKLINE(乾坤眼,O,C,0.5,0),COLORCC66FF;
STICKLINE(假阴,O,C,0.58,0),COLORRED;{假阴柱};
STICKLINE(假阳,O,C,0.58,0),COLORLIGREEN;{假阳柱};
连阴:=COUNT((C<REF(C,1) OR L<REF(L,1)),10)>=5;
间谍柱:=REF(连阴,1) AND (DT OR DT1);
DRAWLINE(间谍柱,(C+O)/2,REF(间谍柱,1),REF((C+O)/2,1),1),COLOR55FFCC;
隐形缺口:=REF(C>O,1) AND MIN(C,O)>REF(C,1) AND L<=REF(H,1);
STICKLINE(隐形缺口,MIN(C,O)*0.998,MIN(C,O),2.8,0),COLORDDDEEE;
收阴:=(C<REF(C,1) OR L<REF(L,1) OR AMOUNT/V/100<REF((C+O)/2,1)) AND O<=REF(C,1);
多阴:=EVERY(收阴,2);
小阳:=O-L<=0.03 AND H>C AND C>O AND O<REF(C,1) AND C<REF(MAX(C,O),1) AND V<REF(V,1);
宝莲灯:=REF(多阴,1) AND 小阳;
STICKLINE(宝莲灯,O,C,2.5,0),COLORCC22FF;
STICKLINE(宝莲灯,(O+C)/2-0.02,(O+C)/2+0.02,2,0),COLORWHITE;
X_36:=COST(1);
X_37:=COST(10);
X_38:=COST(20);
X_39:=COST(30);
X_40:=COST(40);
X_41:=COST(50);
X_42:=COST(60);
X_43:=COST(70);
X_44:=COST(80);
X_45:=COST(90);
X_46:=COST(99);
X_47:=COST(5);
X_48:=COST(15);
X_49:=COST(25);
X_50:=COST(35);
X_51:=COST(45);
X_52:=COST(55);
X_53:=COST(65);
X_54:=COST(75);
X_55:=COST(85);
X_56:=COST(95);
X_57:=X_47-X_36;
X_58:=X_37-X_47;
X_59:=X_48-X_37;
X_60:=X_38-X_48;
X_61:=X_49-X_38;
X_62:=X_39-X_49;
X_63:=X_50-X_39;
X_64:=X_40-X_50;
X_65:=X_51-X_40;
X_66:=X_41-X_51;
X_67:=X_52-X_41;
X_68:=X_42-X_52;
X_69:=X_53-X_42;
X_70:=X_43-X_53;
X_71:=X_54-X_43;
X_72:=X_44-X_54;
X_73:=X_55-X_44;
X_74:=X_45-X_55;
X_75:=X_56-X_45;
X_76:=X_46-X_56;
X_77:=MIN(X_57,MIN(X_58,MIN(X_59,MIN(X_60,MIN(X_61,MIN(X_62,MIN(X_63,MIN(X_64,MIN(X_65,MIN(X_66,MIN(X_67,MIN(X_68,MIN(X_69,MIN(X_70,MIN(X_71,MIN(X_72,MIN(X_73,MIN(X_74,MIN(X_75,X_76)))))))))))))))))));
X_78:=IF(X_57=X_77,(X_47+X_36)/2,IF(X_58=X_77,(X_47+X_37)/2,IF(X_59=X_77,(X_48+X_37)/2,IF(X_60=X_77,(X_48+X_38)/2,IF(X_61=X_77,(X_49+X_38)/2,IF(X_62=X_77,(X_49+X_39)/2,IF(X_63=X_77,(X_50+X_39)/2,IF(X_64=X_77,(X_50+X_40)/2,IF(X_65=X_77,(X_51+X_40)/2,IF(X_66=X_77,(X_51+X_41)/2,IF(X_67=X_77,(X_52+X_41)/2,IF(X_68=X_77,(X_52+X_42)/2,IF(X_69=X_77,(X_53+X_42)/2,IF(X_70=X_77,(X_53+X_43)/2,IF(X_71=X_77,(X_54+X_43)/2,IF(X_72=X_77,(X_54+X_44)/2,IF(X_73=X_77,(X_55+X_44)/2,IF(X_74=X_77,(X_55+X_45)/2,IF(X_75=X_77,(X_56+X_45)/2,(X_56+X_46)/2)))))))))))))))))));
筹码峰:=X_78,COLOR00EEEE,LINETHICK2;
首板:=ZT AND COUNT(ZT,2)=1;
二板:=REF(首板,1) AND ZT;
三板:=REF(二板,1) AND ZT;
四板:=REF(三板,1) AND ZT;
五板:=REF(四板,1) AND ZT;
六板:=REF(五板,1) AND ZT;
七板:=REF(六板,1) AND ZT;
八板:=REF(七板,1) AND ZT;
九板:=REF(八板,1) AND ZT;
十板:=REF(九板,1) AND ZT;
DRAWTEXT(首板,0.1+(C+O)/2,'1'),COLORWHITE;
DRAWTEXT(二板,0.1+(C+O)/2,'2'),COLORYELLOW;
DRAWTEXT(三板,0.1+(C+O)/2,'3'),COLOR00CC99;
DRAWTEXT(四板,0.1+(C+O)/2,'4'),COLORGREEN;
DRAWTEXT(五板,0.1+(C+O)/2,'5'),COLORLIGRAY;
DRAWTEXT(六板,0.1+(C+O)/2,'6'),COLORLIRED;
DRAWTEXT(七板,0.1+(C+O)/2,'7'),COLORLIBLUE;
DRAWTEXT(八板,0.1+(C+O)/2,'8'),COLORBLUE;
DRAWTEXT(九板,0.1+(C+O)/2,'9'),COLORWHITE;
DRAWTEXT(十板,0.1+(C+O)/2,'10'),COLORYELLOW;
{风险系数}
XXX1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
XXX2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替}
XXX3:=FINANCE(23)/FINANCE(10)*3.3;
XXX4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
XXX5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=XXX1+XXX2+XXX3+XXX4+XXX5;
DRAWTEXT_FIX(Z值<1.2,0.52,0.20,1,' ●重 警●'),COLORFFFF00;
DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.52,0.20,1,' ◇轻 警◇'),COLORFFFF00;
DRAWTEXT_FIX(Z值>2.6,0.52,0.20,1,' ◎无 警◎'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT=1,L*0.995,EXTERNSTR(0,4)); { 涨停原因};
- 上一篇公式:通达信跟庄EXPMA主图指标 源码 贴图
- 下一篇公式:通达信量学成交量副图指标 源码 贴图