说明
图中粉线为平均成本线,白线为全部筹码99.99%都获利的价咯线,黄线为全部筹码的95%获利的价咯线
本指标叠加了大智慧超赢BS指标和黄金阶梯指标,以及几条重要的价咯线
用法
买进的条件同时要满足股价高于平均成本线,给出B的买入信号,黄金阶梯为红这三个条件,就可能产生短线黑马
长线大牛股则必须保证白线不断向上,而股价基本运行于平均成本线之上
提示:
选股前先看大势,指数没有给出买进信号之前切记不要盲目操作
指标源码,注意参数N设定为缺省30,最小1,最大240
以下为指标源码
高1:=REF(HHV(H,120),3);
低1:=REF(LLV(L,120),3);H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
突破:=REF(EMA(C,14),1);
A1X:=(EMA(C,10)-突破)/突破*100;
基准:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1));
{
stickline(A1X>=0,突破,突破,10,0),coloryellow;
stickline(A1X<0,突破,ref(突破,1),0,-1000);
}
STICKLINE(A1X>=0,基准,突破,10,0),COLOR000099;
STICKLINE(A1X<0,基准,突破,10,0),COLOR00CC66;
a:="LTFunc6@FORLT2"(N); {计算BS点}
s1:="LTFunc6@LT_S1"(N); {s1=0,向下; s1=1,向上}
hs:="LTFunc6@LT_HS"(N); {短线买入机会}
ls:="LTFunc6@LT_LS"(N); {短线卖出机会}
p1:="LTFunc6@LT_P1"(N); {p1=1,显示BS,p1上穿0线,B点 ; p1下穿1线,S点}
upp:="LTFunc6@LT_UPP"(N);{明日B点预测}
udd:="LTFunc6@LT_UDD"(N);{明日S点预测}
//不用修改
有效a:=SETLBOUND(a,1);
有效s1:=SETLBOUND(s1,1);
有效hs:=SETLBOUND(hs,1);
有效ls:=SETLBOUND(ls,1);
有效p1:=SETLBOUND(p1,1);
有效upp:=SETLBOUND(upp,1);
有效udd:=SETLBOUND(udd,1);
//定义有效下标
d1:=EMA(ABS("ddx.ddx"),60); {ddx绝对值60日指数平滑移动平均}
d2:=MAX("ddx.ddx"/d1+7.5,7.5);
d3:=MIN("ddx.ddx"/d1,10); {能量级别:当日ddx与60日平均值的比值,最高10.0}
fb:=IF(s1=0,hs,ls);
//定义序列变量fb
year1:=YEAR;
month1:=MONTH;
day1:=DAY;
//定义序列变量
有效1:=SETLBOUND(d1,1);
有效2:=SETLBOUND(d2,1);
有效3:=SETLBOUND(d3,1);
有效4:=SETLBOUND(fb,1);
yxyear:=SETLBOUND(year1,1);
yxmonth:=SETLBOUND(month1,1);
yxday:=SETLBOUND(day1,1);
//定义存在的序列变量的有效下标
variable:tr0[DATACOUNT]='',tr1[DATACOUNT]='',tr2[DATACOUNT]='',tr3[DATACOUNT]='',tr4[DATACOUNT]='',bs[DATACOUNT]='',yearstr[DATACOUNT]='',monthstr[DATACOUNT]='',daystr[DATACOUNT]='',datestr[DATACOUNT]='';
for s =1 to DATACOUNT do begin
//循环开始
//{hs;ls;hhs;lls;us;ds;s1;p1;p0;upp;udd};
IF p1[s]=1 then
tr0[s]:='明日收盘价<'+NUMTOSTR(udd[s],2)+',出现S点\n';
else
tr0[s]:='若明日收盘价>'+NUMTOSTR(upp[s],2)+',出现B点\n';
IF s1[s]=1 then
tr1[s]:='明日收盘价<'+NUMTOSTR(ls[s],2)+',短线卖出机会';
else
tr1[s]:='若明日收盘价>'+NUMTOSTR(hs[s],2)+'短线买入机会';
IF p1[s]=1 then begin
IF (p1[s-1]<0 and p1[s]>0) then
//cond只能是单值变量不能是序列变量,cross的参数是序列变量,不能用
//测试语句,IF p1[s]>0 then
tr2[s]:='B点';
else
tr2[s]:='持股';
end;
else begin
IF (1<p1[s-1] and 1>p1[s]) then
tr2[s]:='S点';
else
tr2[s]:='持币';
end;
//tr2改编结束
IF s1[s]=0 then
tr3[s]:='向下';
else
tr3[s]:='向上';
//tr3改编结束
tr4[s]:='3.能量级别:'+NUMTOSTR(d3[s],1)+'级';
//tr4改编结束
yearstr[s]:=NUMTOSTR(year1[s],0);
monthstr[s]:=NUMTOSTR(month1[s],0);
daystr[s]:=NUMTOSTR(day1[s],0);
datestr[s]:=yearstr[s]+'年'+monthstr[s]+'月'+daystr[s]+'日';
bs[s]:=datestr[s]+'买卖点决策系统提示\n'+'1.BS点:'+tr2[s]+','+tr0[s]+'2.短线:'+tr3[s]+tr1[s]+'\n'+tr4[s];
//bs[s]:=datestr[s]+'买卖点决策系统提示\n'+'1.BS点:'+tr2[s]+','+tr0[s]+'2.短线:'+tr3[s]+tr1[s]+tr4[s];
//改编完毕,datestr已改为字符串数组
end;
//drawflagtext(1,fb,bs);
STICKLINE(p1=1 and CLOSE>=OPEN and OPEN<>0,CLOSE,OPEN,d2,0),color5454ff;
STICKLINE(p1=1 and CLOSE>=OPEN and OPEN<>0,CLOSE,OPEN,7.5,0),colorblack;
STICKLINE(p1=1 and CLOSE>=OPEN and OPEN<>0,CLOSE,CLOSE,7.5,0),color5454ff;
STICKLINE(p1=1 and CLOSE>=OPEN and OPEN<>0,OPEN,OPEN,7.5,0),color5454ff;
STICKLINE(p1=1 and CLOSE>=OPEN and OPEN<>0,OPEN,CLOSE,7.5,1),color5454ff;
STICKLINE(p1=1 and CLOSE<=OPEN,OPEN,CLOSE,7.5,1),color5454ff;
STICKLINE(p1=1 and CLOSE<=OPEN,LOW,CLOSE,0.5,1),color5454ff;
STICKLINE(p1=1 and CLOSE<=OPEN,HIGH,OPEN,0.5,1),color5454ff;
STICKLINE((p1<>1 or BARSCOUNT(c)<3) and CLOSE>=OPEN,CLOSE,OPEN,7.5,1),colorffff54;
STICKLINE((p1<>1 or BARSCOUNT(c)<3) and CLOSE>=OPEN,CLOSE,HIGH,0.5,1),colorffff54;
STICKLINE((p1<>1 or BARSCOUNT(c)<3) and CLOSE>=OPEN,LOW,OPEN,0.5,1),colorffff54;
//画k线搞定
//DRAWTEXT(BARPOS=SYSPARAM(1),SYSPARAM(4),bs[SYSPARAM(1)]),COLORwhite;
//弹出浮动窗口提示信息
drawtextex(1,1,0,0,bs[SYSPARAM(1)]);
DRAWICON(p1=1 and REF(p1,1)=0,LOW,'buy1'),align1;
DRAWICON(p1=0 and REF(p1,1)=1,HIGH,'sell1'),align2;
DRAWICON(s1=1 and REF(s1,1)=0 and (p1+REF(p1,1))<>1,LOW,'bs'),align1;
DRAWICON(s1=0 and REF(s1,1)=1 and (p1+REF(p1,1))<>1,HIGH,'ss'),align2;
//绘bs图标搞定
K1:COST(100),COLORWHITE;
K2:COST(95),COLORYELLOW;
K3:COST(50),COLORMAGENTA,linethick3;
|