通达信牛股框架主图指标 大道至美 牛的股票一眼决断 源码 附图
MA30:=MA(C,30),POINTDOT,COLORRED,LINETHICK2;
MA60:=MA(C,60),POINTDOT,COLORYELLOW,LINETHICK2;
MA120:=MA(C,120),POINTDOT,COLORGREEN,LINETHICK2;
MB1:=MA(CLOSE,1),COLOR111111;
X_1:=EMA(CLOSE,3);
X_2:=EMA(CLOSE,26);
X_3:=X_1-X_2;
牵牛线:=EMA(EMA(EMA(CLOSE,3),3),3)+X_3,DOTLINE,COLORGREEN;
X_4:=IF(REF(CLOSE,1)*1.1-CLOSE<0.01,1,0);
STICKLINE(X_4,OPEN,CLOSE,2,0),COLOR66EEEE;
STICKLINE(X_4,OPEN,CLOSE,1,0),COLORMAGENTA;
STICKLINE(X_4,OPEN,CLOSE,0,1),COLOR8B8BFF;
寻牛线:=MA(MA(LOW,3),3),COLORMAGENTA;
{上箱顶:HHV(寻牛线,60),COLORRED,LINETHICK2;
下箱底:LLV(寻牛线,20),COLORGREEN,LINETHICK2;}
上箱顶:MA(REF(HHV(CLOSE,30),1),2),COLORRED,LINETHICK2;
下箱底:MA(REF(LLV(CLOSE,30),1),2),COLORGREEN,LINETHICK2;
IF(寻牛线>=REF(上箱顶,1),寻牛线,DRAWNULL),COLORRED,LINETHICK3;
长底:LLV(MA((CLOSE),3),120),COLORFFBB00,LINETHICK2;
DRAWGBK(C>0,RGB(0,0,0),RGB(00,0,0),0,'BJT5',0);
月: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;
MCST:=DMA(AMOUNT/(100*V),V/CAPITAL),COLORFC9F99;
N:=100;
高1:=REFDATE(HHV(H,N),DATE);
低1:=REFDATE(LLV(L,N),DATE);
H3:=高1-(高1-低1)*0.5;
分水岭:REFDATE(H3,DATE),COLORFFFF00,DOTLINE;
QA:=SUMBARS(V,CAPITAL*1);
QA1:=SUM(COST(10),QA)/QA;
QA2:=SUM(COST(20),QA)/QA;
QA3:=SUM(COST(30),QA)/QA;
QA4:=SUM(COST(40),QA)/QA;
QA5:=SUM(COST(50),QA)/QA;
E:=LLV(L,250)=L;
E1:=BARSLAST(E);
获利线:=(5*QA1+4*QA2+3*QA3+2*QA4+QA5)/15,COLORWHITE,LINETHICK3;
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;DRAWTEXT_FIX(1,0.980,20,1,'★好股网'),COLORYELLOW;
主力成本:=EMA(X,13),LINETHICK1,COLORLIGRAY;
妖线:=EMA(EMA(C,9)*1.11,5),COLORLIMAGENTA,LINETHICK2;
DRAWKLINE(H,O,L,C);
现价:REFDATE(C,DATE),DOTLINE,COLORLIGRAY;
昨半:REF((C+O)/2,1),COLORYELLOW,NODRAW;
半分:(C+O)/2,NODRAW,COLORWHITE;
高:=REF(HHV(H,72),5);
龙门:REFDATE(高,DATE),COLORWHITE,LINETHICK2;
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;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA55:=MA(C,55);
低K:=O<MA5 AND O<MA10 AND O<MA20 AND L<MA30 AND L<MA55;
高K:=C>MA5 AND C>MA10 AND H>MA20 AND H>MA30 AND H>MA55;
选股:=低K AND 高K;
STICKLINE(选股,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(选股,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(选股,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(选股,CLOSE,OPEN,0.5,0),COLORCC66FF;
STICKLINE(选股,OPEN,CLOSE,0.5,0),COLORYELLOW;
DRAWTEXT(选股,L*0.99,'↖一穿五'),COLORYELLOW;
HH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK1;
LL:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;
VAR80:=3*SMA((C-LLV(L,180))/(HHV(H,180)-LLV(L,180))*100,5,1)-2*SMA(SMA((C-LLV(L,180))/(HHV(H,180)-LLV(L,180))*100,180,1),15,1);
疯牛潜力股:=EMA(VAR80,5), NODRAW,COLOR6600FF;
牛熊线:=EMA(HH,90),COLORGREEN,LINETHICK2;
{涨停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;{从涨停到跌停};
假阴:=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;
STICKLINE(假阴,O,C,0.2,0),COLORRED;{假阴柱};
STICKLINE(假阳,O,C,0.7,0),COLORLIGREEN;{假阳柱};
连阴:=COUNT((C<REF(C,1) OR L<REF(L,1)),10)>=5;
间谍柱:=REF(连阴,1) AND (DT OR DT1) ;
DRAWLINE(间谍柱>2,(C+O)/2,REF(间谍柱,1),REF((C+O)/2,1),1),COLOR55FFCC;
筹码峰:'破峰而起主图.顶#DAY',COLORMAGENTA;
首板:=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;
收阴:=(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;
DRAWTEXT(CURRBARSCOUNT=1,L*0.995,EXTERNSTR(0,4)); { 涨停原因};
{仪表盘}{全部仪表图放在T0002/SIGNALS文件夹里}
{设置均线}
范围高:=REFDATE(HHV(H,120),DATE)*1.05;
范围低:=REFDATE(LLV(L,120),DATE)*0.95;
均线5:=MA(C,5);
均线25:=MA(C,25);
均线75:=MA(C,75);
均线200:=IF((MA(C,200)<=范围高 AND MA(C,200)>=范围低) OR C>=MA(C,200),MA(C,200),DRAWNULL);
{设置仪表}
显示仪表盘1:=1;
{选择图片}
主升浪:=ISLASTBAR AND 均线5>均线25 AND 均线25>均线75 AND 均线75>IF(均线200=DRAWNULL,0,均线200);
主浪回调:=ISLASTBAR AND 均线25>均线5 AND 均线5>均线75 AND 均线75>IF(均线200=DRAWNULL,0,均线200);
主浪深调:=ISLASTBAR AND 均线25>均线75 AND 均线75>均线5 AND 均线5>IF(均线200=DRAWNULL,0,均线200);
初升浪:=ISLASTBAR AND IF(均线200=DRAWNULL,300,均线200)>MAX(均线25,均线75) AND 均线5>均线25 AND 均线25>均线75;
底部反弹:=ISLASTBAR AND IF(均线200=DRAWNULL,300,均线200)>均线75 AND 均线75>均线25 AND 均线5>均线25;
探底阶段:=ISLASTBAR AND IF(均线200=DRAWNULL,300,均线200)>均线75 AND 均线75>均线25 AND 均线25>均线5;
观望:=ISLASTBAR AND IF(均线200=DRAWNULL,均线25>均线75 AND C<均线75,均线75>均线200 AND C<均线200);
有牛:=ISLASTBAR AND IF(均线200=DRAWNULL,均线25<均线75 AND C>=均线75,均线75<均线200 AND C>=均线200);
放弃:=ISLASTBAR AND IF(均线200=DRAWNULL,均线25<均线75 AND C<均线75,均线75<均线200 AND C<均线200);
DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0);
DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0);
DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0);
DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0);
DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0);
DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0);
DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0);
DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0);
DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0);
DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0);
T1:=FINDLOWBARS(L,0,60,1);
T2:=FINDLOWBARS(L,T1,120,1);
{DRAWLINE(CURRBARSCOUNT=CONST(T2)+1,L,CURRBARSCOUNT=CONST(T1)+1,L,1),COLORGREEN,DOTLINE;}
T3:=BARSLAST(CURRBARSCOUNT=CONST(T1)+1);
T4:=BARSLAST(CURRBARSCOUNT=CONST(T2)+1);
D1:=REF(L,T3);
D2:=REF(L,T4);
T5:=FINDHIGHBARS(H,20,60,1);
T6:=FINDHIGHBARS(H,T1,120,1);
SG:=DRAWLINE(CURRBARSCOUNT=CONST(T6)+1,H,CURRBARSCOUNT=CONST(T5)+1,H,1),COLORRED,DOTLINE;
GOODGUPIAO:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
T7:=BARSLAST(CURRBARSCOUNT=CONST(T5)+1);
T8:=BARSLAST(CURRBARSCOUNT=CONST(T6)+1);
G1:REF(H,T7),COLORYELLOW,LINETHICK2;
G2:REF(H,T8),COLORYELLOW,LINETHICK2;
{板块排名}
TAX:=HORCALC(HYBLOCK,105,1,DRAWNULL);
TAA:=STRCAT(HYBLOCK,' 排名 :');
DRAWTEXT_FIX(ISLASTBAR,0.70,0.005,0,STRCAT(TAA,CON2STR(TAX,0)));
日:=50;
昨前:=3;
高2:=REF(HHV(H,日),昨前);
低2:=REF(LLV(L,日),昨前);
H4:=高2-(高2-低2)*0.618;
H5:=高2-(高2-低2)*0.809;
圆底支撑:=REFDATE(H5,DATE);
黄金支撑:=REFDATE(H4,DATE);
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1);
B1:=FILTER(A1,10);
C1:=BACKSET(B1,10+1);
HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1);
B2:=FILTER(A2,10);
C2:=BACKSET(B2,10+1);
LD:=FILTER(C2,10);
前期高位:=REF(C,BARSLAST(HD));
A0:=REF(TY,7)=HHV(TY,2*7+1);
B0:=FILTER(A0,7);
C0:=BACKSET(B0,7+1);
HD0:=FILTER(C0,7);
前期高位0:=REF(C,BARSLAST(HD0));
PHD:=FILTER(BACKSET(FILTER(REF(H,10)=HHV(H,2*10+1),10),10+1),10);
PLD:=FILTER(BACKSET(FILTER(REF(L,10)=LLV(L,2*10+1),10),10+1),10);
PA:=REF(H,BARSLAST(PHD));
PT1:=BARSLAST(PHD)<BARSLAST(PLD) AND NOT(PHD);
波顶:=IF(PT1,PA,PA);
突破:=(CROSS(C,前期高位0) OR CROSS(C,前期高位) OR CROSS(C,黄金支撑) OR CROSS(C,圆底支撑) OR CROSS(C,波顶)) AND C/O>1.05;
STICKLINE(突破,OPEN,CLOSE,4.5,0),COLORFF0099;
STICKLINE(突破,OPEN,CLOSE,3,0),COLORFF00CC;
STICKLINE(突破,OPEN,CLOSE,2,0),COLORFF00FF;
DRAWTEXT(突破,MA(H,3),'↙突破'),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:COST
该公式包含未来函数:CAPITAL
该公式包含未来函数:FINANCE
该公式包含未来函数:DHIGH
该公式包含未来函数:DLOW
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
MA30赋值:C的30日简单移动平均,POINTDOT,COLORRED,LINETHICK2
MA60赋值:C的60日简单移动平均,POINTDOT,COLORYELLOW,LINETHICK2
MA120赋值:C的120日简单移动平均,POINTDOT,COLORGREEN,LINETHICK2
MB1赋值:CLOSE的1日简单移动平均,COLOR111111
X_1赋值:CLOSE的3日指数移动平均
X_2赋值:CLOSE的26日指数移动平均
X_3赋值:X_1-X_2
牵牛线赋值:CLOSE的3日指数移动平均,3),3)+X_3,DOTLINE,COLORGREEN
X_4赋值:IF(1日前的CLOSE*1.1-CLOSE<0.01,1,0)
当满足条件X_4时,在OPEN和CLOSE之间画柱状线
当满足条件X_4时,在OPEN和CLOSE之间画柱状线
当满足条件X_4时,在OPEN和CLOSE之间画柱状线
寻牛线赋值:最低价的3日简单移动平均,3),COLORMAGENTA
输出{上箱顶:60日内寻牛线最高值,COLORRED,LINETHICK2
输出下箱底:20日内寻牛线最低值,COLORGREEN,LINETHICK2
输出}
上箱顶:MA(REF(30日内CLOSE最高值,1),2),COLORRED,LINETHICK2
输出下箱底:MA(REF(30日内CLOSE最低值,1),2),COLORGREEN,LINETHICK2
IF(寻牛线>=1日前的上箱顶,寻牛线,DRAWNULL),COLORRED,LINETHICK3
输出长底:LLV(MA((CLOSE),3),120),COLORFFBB00,LINETHICK2
DRAWGBK(C>0,RGB(0,0,0),RGB(00,0,0),0,'BJT5',0)
输出月:REF(O,上次MONTH!=REF(MONTH,1距今天数)),COLORFFFF00,NODRAW,LINETHICK6
当满足条件C>月时,在月和月之间画柱状线
当满足条件C<月时,在月和月之间画柱状线
当满足条件C=月时,在月和月之间画柱状线
MCST赋值:DMA(AMOUNT/(100*V),V/CAPITAL),COLORFC9F99
N赋值:100
高1赋值:REFDATE(N日内H最高值,DATE)
低1赋值:REFDATE(N日内L最低值,DATE)
H3赋值:高1-(高1-低1)*0.5
输出分水岭:REFDATE(H3,DATE),COLORFFFF00,DOTLINE
QA赋值:V累加至CAPITAL*1的天数
QA1:=SUM(获利盘为10%的成本分布,QA)/QA
QA2:=SUM(获利盘为20%的成本分布,QA)/QA
QA3:=SUM(获利盘为30%的成本分布,QA)/QA
QA4:=SUM(获利盘为40%的成本分布,QA)/QA
QA5:=SUM(获利盘为50%的成本分布,QA)/QA
E赋值:250日内L最低值=L
E1:=上次E距今天数
获利线赋值:(5*QA1+4*QA2+3*QA3+2*QA4+QA5)/15,COLORWHITE,LINETHICK3
A赋值:(3*C+L+O+H)/6
X赋值:(20*A+19*1日前的A+18*2日前的A+17*3日前的A+16*4日前的A+15*5日前的A+14*6日前的A+13*7日前的A+12*8日前的A+11*9日前的A+10*10日前的A+9*11日前的A+8*12日前的A+7*13日前的A+6*14日前的A+5*15日前的A+4*16日前的A+3*17日前的A+2*18日前的A+20日前的A)/210
当满足条件DRAWTEXT_FIX1时,在横轴0.980纵轴20位置书写文字
主力成本赋值:X的13日指数移动平均,LINETHICK1,COLORLIGRAY
妖线赋值:C的9日指数移动平均*1.11,5),COLORLIMAGENTA,LINETHICK2
DRAWKLINE(H,O,L,C)
输出现价:REFDATE(C,DATE),DOTLINE,COLORLIGRAY
输出昨半:REF((C+O)/2,1),COLORYELLOW,NODRAW
输出半分:(C+O)/2,NODRAW,COLORWHITE
高赋值:REF(72日内H最高值,5)
输出龙门:REFDATE(高,DATE),COLORWHITE,LINETHICK2
TM赋值:1200823
输出涨停:IF(DATE
输出跌停:IF(DATE
明输出涨停:IF(DATE
明输出跌停:IF(DATE
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
MA5:=C的5日简单移动平均
MA10:=C的10日简单移动平均
MA20:=C的20日简单移动平均
MA55:=C的55日简单移动平均
低K赋值:O
高K:=C>MA5 AND C>MA10 AND H>MA20 AND H>MA30 AND H>MA55
选股赋值:低K AND 高K
当满足条件选股时,在CLOSE和OPEN之间画柱状线
当满足条件选股时,在CLOSE和OPEN之间画柱状线
当满足条件选股时,在CLOSE和OPEN之间画柱状线
当满足条件选股时,在CLOSE和OPEN之间画柱状线
当满足条件选股时,在OPEN和CLOSE之间画柱状线
当满足条件DRAWTEXT选股时,在L*0.99和'↖一穿五'位置书写文字
HH赋值:(20*H+19*1日前的H+18*2日前的H+17*3日前的H+16*4日前的H+15*5日前的H+14*6日前的H
+13*7日前的H+12*8日前的H+11*9日前的H+10*10日前的H+9*11日前的H+8*12日前的H
+7*13日前的H+6*14日前的H+5*15日前的H+4*16日前的H+3*17日前的H+2*18日前的H+
20日前的H)/210,COLORBLUE,LINETHICK1
LL赋值:(20*L+19*1日前的L+18*2日前的L+17*3日前的L+16*4日前的L+15*5日前的L+14*6日前的L
+13*7日前的L+12*8日前的L+11*9日前的L+10*10日前的L+9*11日前的L+8*12日前的L
+7*13日前的L+6*14日前的L+5*15日前的L+4*16日前的L+3*17日前的L+2*18日前的L+
20日前的L)/210,COLORBLUE,LINETHICK1
VAR80:=3*SMA((C-180日内L最低值)/(180日内H最高值-180日内L最低值)*100,5,1)-2*SMA(SMA((C-180日内L最低值)/(180日内H最高值-180日内L最低值)*100,180,1),15,1)
疯牛潜力股赋值:VAR80的5日指数移动平均, NODRAW,COLOR6600FF
牛熊线赋值:HH的90日指数移动平均,COLORGREEN,LINETHICK2
{涨停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
当满足条件DRAWTEXTZT AND DT1 AND PERIOD=5时,在L-0.03和'地天板'位置书写文字
当满足条件DRAWTEXTDT AND ZT1 AND PERIOD=5时,在H+0.03和'天地板'位置书写文字
{从涨停到跌停}
当满足条件DRAWTEXTDT1时,在L-0.09和'撬板'位置书写文字
{从涨停到跌停}
当满足条件DRAWTEXTZT1时,在H+0.03和'炸板'位置书写文字
{从涨停到跌停}
假阴赋值:1日前的C>=O AND AMOUNT/V/100>1日前的C AND C
假阳赋值:1日前的C<=O AND H<1日前的O AND C<(1日前的O-C)/3+1日前的C AND AMOUNT/V/100<1日前的C AND C>O
当满足条件假阴时,在O和C之间画柱状线
{假阴柱}
当满足条件假阳时,在O和C之间画柱状线
{假阳柱}
连阴赋值:COUNT((C<1日前的C OR L<1日前的L),10)>=5
间谍柱赋值:1日前的连阴 AND (DT OR DT1)
DRAWLINE(间谍柱>2,(C+O)/2,1日前的间谍柱,REF((C+O)/2,1),1),COLOR55FFCC
输出筹码峰:'破峰而起主图.顶#DAY',COLORMAGENTA
首板赋值:ZT AND 统计2日满足ZT的天数=1
二板赋值:1日前的首板 AND ZT
三板赋值:1日前的二板 AND ZT
四板赋值:1日前的三板 AND ZT
五板赋值:1日前的四板 AND ZT
六板赋值:1日前的五板 AND ZT
七板赋值:1日前的六板 AND ZT
八板赋值:1日前的七板 AND ZT
九板赋值:1日前的八板 AND ZT
十板赋值: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_FIXZ值<1.2时,在横轴0.52纵轴0.20位置书写文字
DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.52,0.20,1,' ◇轻 警◇'),COLORFFFF00
当满足条件DRAWTEXT_FIXZ值>2.6时,在横轴0.52纵轴0.20位置书写文字
收阴赋值:(C<1日前的C OR L<1日前的L OR AMOUNT/V/100[
多阴赋值:收阴最近2日一直存在]
小阳赋值:O-L<=0.03 AND H>C AND C>O AND O<1日前的C AND C[
宝莲灯赋值:1日前的多阴 AND 小阳]
当满足条件宝莲灯时,在O和C之间画柱状线
STICKLINE(宝莲灯,(O+C)/2-0.02,(O+C)/2+0.02,2,0),COLORWHITE
DRAWTEXT(CURRBARSCOUNT=1,L*0.995,EXTERNSTR(0,4))
{ 涨停原因}
{仪表盘}{全部仪表图放在T0002/SIGNALS文件夹里}
{设置均线}
范围高赋值:REFDATE(120日内H最高值,DATE)*1.05
范围低赋值:REFDATE(120日内L最低值,DATE)*0.95
均线5赋值:C的5日简单移动平均
均线25赋值:C的25日简单移动平均
均线75赋值:C的75日简单移动平均
均线200赋值:IF((C的200日简单移动平均<=范围高 AND C的200日简单移动平均>=范围低) OR C>=C的200日简单移动平均,C的200日简单移动平均,DRAWNULL)
{设置仪表}
显示仪表盘1赋值:1
如果均线200=DRAWNULL返回0否则返回均线200
如果均线200=DRAWNULL返回0否则返回均线200
如果均线200=DRAWNULL返回0否则返回均线200
如果均线200=DRAWNULL返回300否则返回均线200
如果均线200=DRAWNULL返回300否则返回均线200
如果均线200=DRAWNULL返回300否则返回均线200
如果均线200=DRAWNULL返回均线25>均线75 AND C<均线75否则返回均线75>均线200 AND C<均线200
如果均线200=DRAWNULL返回均线25<均线75 AND C>=均线75否则返回均线75<均线200 AND C>=均线200
如果均线200=DRAWNULL返回均线25<均线75 AND C<均线75否则返回均线75<均线200 AND C<均线200
DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0)
DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0)
DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0)
DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0)
DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0)
DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0)
DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0)
DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0)
DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0)
DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0)
T1赋值:FIND最低价BARS(L,0,60,1)
T2赋值:FIND最低价BARS(L,T1,120,1)
{DRAWLINE(CURRBARSCOUNT=CONST(T2)+1,L,CURRBARSCOUNT=CONST(T1)+1,L,1),COLORGREEN,DOTLINE
}
T3赋值:上次CURRBARSCOUNT=CONST(T1距今天数+1)
T4赋值:上次CURRBARSCOUNT=CONST(T2距今天数+1)
D1赋值:T3日前的L
D2赋值:T4日前的L
T5赋值:FIND最高价BARS(H,20,60,1)
T6赋值:FIND最高价BARS(H,T1,120,1)
SG赋值:DRAWLINE(CURRBARSCOUNT=CONST(T6)+1,H,CURRBARSCOUNT=CONST(T5)+1,H,1),COLORRED,DOTLINE
GOODGUPIAO:=成交量/((最高价-最低价)*2-CLOSE-OPEN的绝对值)
T7赋值:上次CURRBARSCOUNT=CONST(T5距今天数+1)
T8赋值:上次CURRBARSCOUNT=CONST(T6距今天数+1)
输出G1:T7日前的H,COLORYELLOW,LINETHICK2
输出G2:T8日前的H,COLORYELLOW,LINETHICK2
{板块排名}
TAX赋值:HORCALC(HYBLOCK,105,1,DRAWNULL)
TAA赋值:STRCAT(HYBLOCK,' 排名 :')
DRAWTEXT_FIX(ISLASTBAR,0.70,0.005,0,STRCAT(TAA,CON2STR(TAX,0)))
日赋值:50
昨前赋值:3
高2:=REF(日日内H最高值,昨前)
低2赋值:REF(日日内L最低值,昨前)
H4赋值:高2-(高2-低2)*0.618
H5赋值:高2-(高2-低2)*0.809
圆底支撑赋值:REFDATE(H5,DATE)
黄金支撑赋值:REFDATE(H4,DATE)
TY赋值:C
A1:=10日前的TY=2*10+1日内TY最高值
B1赋值:FILTERA1的10过滤
C1赋值:BACKSET(B1,10+1)
HD赋值:FILTERC1的10过滤
A2:=10日前的TY=2*10+1日内TY最低值
B2赋值:FILTERA2的10过滤
C2赋值:BACKSET(B2,10+1)
LD赋值:FILTERC2的10过滤
前期高位:=REF(C,上次HD距今天数)
A0:=7日前的TY=2*7+1日内TY最高值
B0赋值:FILTERA0的7过滤
C0赋值:BACKSET(B0,7+1)
HD0:=FILTERC0的7过滤
前期高位0:=REF(C,上次HD0距今天数)
PHD赋值:FILTER(BACKSET(FILTER(10日前的H=2*10+1日内H最高值,10),10+1),10)
PLD赋值:FILTER(BACKSET(FILTER(10日前的L=2*10+1日内L最低值,10),10+1),10)
PA赋值:REF(H,上次PHD距今天数)
PT1赋值:上次PHD距今天数如果PT1返回PA否则返回PA
突破赋值:(C上穿前期高位0 OR C上穿前期高位 OR C上穿黄金支撑 OR C上穿圆底支撑 OR C上穿波顶) AND C/O>1.05
当满足条件突破时,在OPEN和CLOSE之间画柱状线
当满足条件突破时,在OPEN和CLOSE之间画柱状线
当满足条件突破时,在OPEN和CLOSE之间画柱状线
DRAWTEXT(突破,H的3日简单移动平均,'↙突破'),COLORYELLOW