您现在的位置:好股网 >> 股票公式 >> 通达信公式 >> 一键转帖:明丽一眼辨牛熊 主图源码 通达信

明丽一眼辨牛熊 主图源码 通达信


指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:182 KB
更新时间:2018-02-11 21:19:00
公式简介:

首先感谢宜通直播给同学们提供这么好的交流平台,宜通是一个人才辈出的好地方,这里许许多多的老师和同学值得明丽永远去学习,正是这个直播间让自己学会了许多指标编写方面的知识,才有了今天明丽主图指标的完成。在此明丽感谢论坛的每一位老师和同学,感谢大家的无私和帮助!祝所有老师和同学股票天天涨!

明丽主图指标是明丽经过几年的思考和摸索总结出来的具有实战意义的指标,其特点是简洁、简单、直观。该指标把股票分为牛股、猴股、熊股三类,并用三张图片(见附件)分别显示在主图上,是牛是熊一目了然,一眼辨牛熊不再是一句空话。

安装方法
  本指标采用导入法安装,安装成功后打开指标即可看到源码。安装方法,下载附件后解压、导入琪新牧牛主图指标,并把警示图粘贴在通达信安装目录下的T0002文件夹中的signals文件夹下。指标安装后,即可调入明丽主图指标。
  使用方法:
  目前大盘处于熊市,建议选择第一类股票即牛股类股票作为操作对象,这类股票主力介入程度深、有一定的题材支撑,多为市场的热点所在,操作的成功率相对较高,是中短线操作者的首先目标。至于猴股类股票,由于多为牛股类股票大幅调整的产物,股票的波动幅度较大,操作的风险相对较高,稍有不慎就会深套其中,对于心理承受能力弱的投资者尽量回避。熊股类股票,是正在调整的股票,主力无心恋战,散户深套其中,所以股票的价格会不断走低,即使有的股票偶尔走强也是昙花一现,这类股票坚决回避。

源码:

N1:=18;N2:=50;N3:=89;N4:=180;
DRAWBAND(MA(C,18),RGB(185,20,30),MA(C,50),RGB(0,100,100));DRAWKLINE(H,O,L,C);
{警示牌设置}
警示牌:=1;
高:=REFDATE(HHV(H,180),DATE)*1.05;
低:=REFDATE(LLV(L,180),DATE)*0.95;
A11:=MA(C,18);
A12:=MA(C,50);
A13:=MA(C,89);
A14:=IF((MA(C,180)<=高 AND MA(C,180)>=低) OR C>=MA(C,180),MA(C,180),DRAWNULL);
{—————股性判断—————}
牛股:=ISLASTBAR AND A11>A12 AND A12>A13 AND A13>IF(A14=DRAWNULL,0,A14) AND C>A11 OR ISLASTBAR AND A11>A12 AND C>=A11;
猴股:=ISLASTBAR AND A11>A12 AND C<A11 ;
熊股:=ISLASTBAR AND IF(A14=DRAWNULL,A12<A13 AND C<A13,A13<A14 AND C<A14) OR ISLASTBAR AND A11<A12;
DRAWGBK(警示牌=1 AND 牛股,0,0,0,'牛股',0);
DRAWGBK(警示牌=1 AND 猴股,0,0,0,'猴股',0);
DRAWGBK(警示牌=1 AND 熊股,0,0,0,'熊股',0);
DRAWKLINE(H,O,L,C);

MA18:MA(C,N1),COLORWHITE;
MA50:MA(C,N2),COLORYELLOW;
MA89:MA(C,N3),COLORFF00FF;
MA180:MA(C,N4),COLORRED;

超买:=MA(C,10)*IF(CAPITAL=0,1.04,1.1),POINTDOT,COLORGREEN,LINETHICK2;
DRAWTEXT(CROSS(MA(C,N1),MA(C,N2)),MA(C,N2)*0.99,'↖金叉'),LINETHICK2,COLORFF00FF;
{财务数据}
所属板块:=STRCAT('所属板块: ',STRCAT(STRCAT(STRCAT('  行业 ',HYBLOCK),STRCAT('  地域

',DYBLOCK)),STRCAT(' 概念 ',GNBLOCK)));
总股本:=STRCAT(STRCAT('  总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
流通盘:=STRCAT(STRCAT(' 流通盘: ',CON2STR(CAPITAL/1000000,2)),'亿');
市值:=STRCAT(STRCAT(' 流通市值: ',CON2STR((CAPITAL/1000000)*C,2)),'亿');
上市日期:=STRCAT(' 上市日期: ',CON2STR(HHV((BARSCOUNT(C)=0)*(DATE+19000000),0),0));
股本市值:=STRCAT('股本市值: ',STRCAT(STRCAT(STRCAT(总股本,流通盘),市值),上市日期));
{显示设置}
DRAWTEXT_FIX(ISLASTBAR,0.005,0,0,所属板块),COLORYELLOW,LINETHICK2;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.118,0,股本市值),COLORGREEN,LINETHICK2;
DRAWTEXT_FIX(C>0,0.005,0.06,0,'主题投资:'),COLORFF00FF,LINETHICK2;
DRAWTEXT_FIX(C>0,0.078,0.06,0,EXTERNSTR(0,2)),COLORFF00FF,LINETHICK2;

{涨停K线};
ZD:=100*(C-REF(C,1))/REF(C,1);
涨停:=ZD>=9.90;
STICKLINE((涨停>0 AND C=H),O, H, 3, 0),LINETHICK3, COLORYELLOW;

{大阳线}
大阳线:=ZD>=5.00 AND ZD<9.90;
STICKLINE((大阳线>0 AND C<=H),O, C, 3, 0),LINETHICK3, COLORFF00FF;

{金叉K线}
{靠线金叉}
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C<=MA(C,18)*1.03,H,C,0.05,0), COLOR0000FF;
STICKLINE(CROSS(MA(C,18),MA(C,50))AND C<=MA(C,18)*1.03,C,O,3,0), COLOR0066FF;
STICKLINE(CROSS(MA(C,18),MA(C,50))AND C<=MA(C,18)*1.03,O,L,0.05,0), COLOR0099FF;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C<=MA(C,18)*1.03 AND C<O,O,(C-O)/2+O,3,0),COLORFFFF80;
{线上金叉}
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C>MA(C,18)*1.03 AND C>O,C,(C-O)/2+O,3,0),COLORRED;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C>MA(C,18)*1.03 AND C>O,O,(C-O)/2+O,3,0),COLORYELLOW;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C>MA(C,18)*1.03 AND C>O,C,H,0.5,0),COLORRED;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C>MA(C,18)*1.03 AND C<O,C,(C-O)/2+O,3,0),COLORRED;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C>MA(C,18)*1.03 AND C<O,O,(C-O)/2+O,3,0),COLORFFFF80;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C>MA(C,18)*1.03 AND C<O,O,H,0.5,0),COLORFFFF80;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C>MA(C,18)*1.03 AND C<O,C,L,0.5,0),COLORRED;
{线下金叉}
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C<MA(C,18) AND C>=O,C,(C-O)/2+O,3,0),COLORYELLOW;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C<MA(C,18) AND C>=O,O,(C-O)/2+O,3,0),COLORRED;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C<MA(C,18) AND C>=O,C,H,0.5,0),COLORYELLOW;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C<MA(C,18) AND C<O,C,(C-O)/2+O,3,0),COLORYELLOW;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C<MA(C,18) AND C<O,O,(C-O)/2+O,3,0),COLORFFFF80;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C<MA(C,18) AND C<O,O,H,0.5,0),COLORFFFF80;
STICKLINE(CROSS(MA(C,18),MA(C,50)) AND C<MA(C,18) AND C<O,C,L,0.5,0),COLORYELLOW;

{本周5周均线自动画线显示在日线上}

年:=YEAR,NODRAW;
月:=MONTH,NODRAW;
星期:=WEEKDAY,NODRAW;
日1:=DATETODAY(DATE);
上市日:=REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT);
自然日:=日1-DATETODAY(上市日)+1;
ZB:=(自然日-REF(自然日,1))!=星期-REF(星期,1)
OR TOTALBARSCOUNT-CURRBARSCOUNT=0;
本周第几天:=BARSLAST(ZB)+1;
本月第几天:=BARSLAST(年*100+月!=REF(年*100+月,1))+1;
MA1:=REF(C,本周第几天);
MA2:=REF(MA1,本周第几天);
MA3:=REF(MA2,本周第几天);
MA4:=REF(MA3,本周第几天);
五周价:=(C+MA1+MA2+MA3+MA4)/5;
五周:REFDATE(五周价,DATE),COLOR9E9E21,LINETHICK1;

{T+1止赢、止损}
CC:=IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL),COLORWHITE;
止赢:1.05*CC,COLORYELLOW,NODRAW;
止损:0.97*CC,COLORFF00FF,NODRAW;

{支撑压力}
N:=18;
A1:=REF(H,N)=HHV(H,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
D1:=FILTER(C1,N);
A2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
D2:=FILTER(C2,N);
E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;
E2:=(H+L)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1:=(D2 AND NOT(D1 AND E1<E2));
H2:=D1 AND NOT(D2 AND E1>=E2);
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
S1:=R1>REF(R1,1);
T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
U1:=T1>REF(T1,1);
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);
S2:=R2>REF(R2,1);
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);
U2:=T2>REF(T2,1);
NOTEXT1:DRAWLINE(S2,H,S1,H,1),LINETHICK2,COLORRED;
NOTEXT2:DRAWLINE(U2,L,U1,L,1),LINETHICK2,COLORGREEN;

DA:=YEAR AND MONTH AND DAY;
AAA:=STRCAT(CON2STR(YEAR,0),'年');
AAB:=STRCAT(CON2STR(MONTH,0),'月');
AA33:=STRCAT(CON2STR(DAY,0),'日');
AA4:=STRCAT('【',IF(WEEKDAY=1,'星期一',IF(WEEKDAY=2,'星期二',IF(WEEKDAY=3,'星期三',IF(WEEKDAY=4,'星期四',IF(WEEKDAY=5,'星期五',IF(WEEKDAY=6,'六','日')))))));
AA:=STRCAT(STRCAT(STRCAT(AAA,AAB),STRCAT(AA33,AA4)),'】');
SA:DRAWTEXT_FIX(DA,0,1,0,AA),COLORGREEN;


 






 


[url=http://www.goodgupiao.com/gupiaogongshi/49142.html][B]明丽一眼辨牛熊 主图源码 通达信[/B][/url]