联系方式 Contact

云指标公式网

淘宝:zb-mart.taobao.com

电话:18020657357

微信:18020657357

Q Q:396950280

点击这里给我发消息

网址:www.yzhibiao.com

搜索 Search

BSMA主图源码

2015-7-24 15:13:56点击:

{BSMA主图源码}
a:="LTFunc6@FORLT2";
s1:="LTFunc6@LT_S1"; 
hs:="LTFunc6@LT_HS";
ls:="LTFunc6@LT_LS"; 
p1:="LTFunc6@LT_P1";
upp:="LTFunc6@LT_UPP"; 
udd:="LTFunc6@LT_UDD";

{hs;ls;hhs;lls;us;ds;s1;p1;p0;upp;udd};
d1:=ema(abs("ddx.ddx"),60);
d2:=max("ddx.ddx"/d1+7.5,7.5);
d3:=min("ddx.ddx"/d1,10);
fb:=if(s1=0,hs,ls);
tr0:=ifs(p1=1,'明日收盘价<'+numtostrn(udd,2)+',出现S点\n','若明日收盘价>'+numtostrn(upp,2)+',出现B点\n');
tr1:=ifs(s1=1,'明日收盘价<'+numtostrn(ls,2)+',短线卖出机会','若明日收盘价>'+numtostrn(hs,2)+'短线买入机会');
tr2:=ifs(p1=1,ifs(cross(p1,0),'B点','持股'),ifs(cross(1,p1),'S点','持币'));
tr3:=ifs(s1=0,'向下,','向上,');
tr4:='3.能量级别:'+numtostrn(d3,1)+'级';

bs:=''+datestr(date)+'买卖点决策系统提示\n'+'1.BS点:'+tr2+','+tr0+'2.短线:'+tr3+tr1+'\n'+tr4;
drawflagtext(1,fb,bs);

STICKLINE(p1=1 and c>=o and o<>0,c,o,d2,0),color5454ff;
STICKLINE(p1=1 and c>=o and o<>0,c,o,7.5,0),colorblack;
STICKLINE(p1=1 and c>=o and o<>0,c,c,7.5,0),color5454ff;
STICKLINE(p1=1 and c>=o and o<>0,o,o,7.5,0),color5454ff;
STICKLINE(p1=1 and c>=o and o<>0,o,c,7.5,1),color5454ff;
STICKLINE(p1=1 and c<=o,o,c,7.5,1),color5454ff;
STICKLINE(p1=1 and c<=o,l,c,0.5,1),color5454ff;
STICKLINE(p1=1 and c<=o,h,o,0.5,1),color5454ff;

STICKLINE((p1<>1 or barscount(c)<3) and c>=o,c,o,7.5,1),colorffff54;
STICKLINE((p1<>1 or barscount(c)<3) and c>=o,c,h,0.5,1),colorffff54;
STICKLINE((p1<>1 or barscount(c)<3) and c>=o,l,o,0.5,1),colorffff54;

drawbmp(p1=1 and ref(p1,1)=0,l,'buy1.bmp'),align1,valign0;
drawbmp(p1=0 and ref(p1,1)=1,h,'sell1.bmp'),align1,valign2;

drawbmp(s1=1 and ref(s1,1)=0 and (p1+ref(p1,1))<>1,l,'bs.bmp'),align1,valign0;
drawbmp(s1=0 and ref(s1,1)=1 and (p1+ref(p1,1))<>1,h,'ss.bmp'),align1,valign2;
{均线}
MA5:MA(CLOSE,5);
MA13:MA(CLOSE,13);
MA21:MA(CLOSE,21);
MA34:MA(CLOSE,34);
MA62:MA(CLOSE,62);
MA120:MA(CLOSE,120);
{支撑压力线} 
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)),COLORRED{红色},POINTDOT;
支撑线:REF(C,BARSLAST(LD)),COLORYELLOW{黄},POINTDOT; 
STICKLINE(C,压力线,压力线,8,0),COLORRED{红色};
STICKLINE(C,支撑线,支撑线,8,0),COLORYELLOW{黄};
{短期压力支撑}
X1:=REF(TY,5)=HHV(TY,2*5+1); Y1:=FILTER(X1,5); Z1:=BACKSET(Y1,5+1); HA:=FILTER(Z1,5); 
X2:=REF(TY,5)=LLV(TY,2*5+1); Y2:=FILTER(X2,5); Z2:=BACKSET(Y2,5+1); LA:=FILTER(Z2,5); 
短压力:REF(C,BARSLAST(HA)),colormagenta{品红},POINTDOT;
短支撑:REF(C,BARSLAST(LA)),colorgreen{绿},POINTDOT; 
STICKLINE(C,短压力,短压力,8,0),colormagenta{品红};
STICKLINE(C,短支撑,短支撑,8,0),colorgreen{绿};
{K线图左上方显示股票信息文字}
DRAWTEXTREL(1,10,'■所属板块:'+BKNAME),COLORRED{红色};
DRAWTEXTREL(1,60,'■流通盘 :'+CAPITAL/100+'万股'),COLORYELLOW;
DRAWTEXTREL(1,110,'■流通市值:'+DYNAINFO(57)/100000000+'亿'),COLORYELLOW;
DRAWTEXTREL(1,160,'■每股收益:'+FINANCE2(3)),COLORYELLOW;
DRAWTEXTREL(1,210,'■每股净资:'+FINANCE2(4)),COLORYELLOW;
DRAWTEXTREL(1,260,'■主营收入:'+FINANCE2(27)),COLORYELLOW;
DRAWTEXTREL(1,310,'■净利润 :'+FINANCE2(33)),COLORYELLOW;
DRAWTEXTREL(1,360,'■利润增长:'+FINANCE2(10)+'%'),COLORYELLOW;
DRAWTEXTREL(1,410,'■市盈率 :'+DYNAINFO(39)),COLORYELLOW;