{股市航灯5}
TJTS:=BARSTATUS=2;
cg:=hhv(h,125);
cgl:=llv(h,125);
j:=(cg-cgl)/8;
IF C>0 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg*1.04,'股市航灯 '),LINETHICK6,Coloryellow,ALIGN2;
DRAWTEXT(C>0,cg*1.04,STKLABEL+' '+STKNAME+' '),LINETHICK6,ColorFFFF80,ALIGN2;
DRAWTEXT(C>0,cg*1.04,' '+ '流通:'+NUMTOSTRN( FINANCE(7),0 )+' '+'换手:'+NUMTOSTRN( DYNAINFO(37)*100,3 )+' '),LINETHICK3,ColorFFFF80,ALIGN2;end;
fs:=sma(h,21,2)*1.05;
ls:=sma(l,21,2)*0.95;
bd:=sma(l,5,1);
rd:=sma(c,2,1);
航灯1:=if(cross(rd,bd),fs*1.05,bd);
航灯2:=if(cross(rd,fs),fs*1.1,ls);
前兆:=航灯1;
fillrgn(bd,航灯1,航灯1>bd),colorff9900;
PARTLINE(航灯1,航灯1>bd),POINTDOT,LINETHICK7,colorff9900;
PARTLINE(航灯1,航灯1>bd),POINTDOT,LINETHICK3,colorffffff;
fillrgn(ls,航灯2,航灯2>ls),color0000ff;
PARTLINE(航灯2,航灯2>ls),POINTDOT,LINETHICK7,color0000ff;
PARTLINE(航灯2,航灯2>ls),POINTDOT,LINETHICK3,colorffffff;
热点:=航灯2;
上线:sma(h,21,2)*1.05,color0000ff;
IF rd>上线 and TJTS THEN DRAWTEXT(C>0,cg*1.04,'热点持续区:辨别黑码 '),LINETHICK3,color0000ff,ALIGN2;
中线:bd,colorff00ff;
下线:sma(l,21,2)*0.95,color00ffff;
股市:rd,POINTDOT,LINETHICK7,color00ff00;
PARTLINE(股市,c>0),POINTDOT,LINETHICK3,colorffffff;
life:=(ema(c,60)+ema(c,90))/2;
var1:=(2*c+h+l)/4;
snook:=ema(var1,99)*0.91;
IF c>life AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'操作区域分析:多头区域 '),LINETHICK3,color3300ff,ALIGN2;
IF c<=life AND c>=snook AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'操作区域分析:盘整区域 '),LINETHICK3,colorff0066,ALIGN2;
IF c
vVar1:=DYNAINFO(17)*REF(MA(VOL,5),1);
vVar2:=DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT;
Var3:=DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT;
hhsl:=IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,vVar1,vVar2);
hsl:=hhsl/capital*100;
IF hsl<1 AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'个股活跃分析:绝对地量 '),LINETHICK3,color33ffcc,ALIGN2;
IF hsl>=1 and hsl<2 AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'个股活跃分析:成交低靡 '),LINETHICK3,color33ffcc,ALIGN2;
IF hsl>=2 and hsl<3 AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'个股活跃分析:成交温和 '),LINETHICK3,color33ffcc,ALIGN2;
IF hsl>=3 and hsl<5 AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'个股活跃分析:成交活跃 '),LINETHICK3,color33ffcc,ALIGN2;
IF hsl>=5 and hsl<8 AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'个股活跃分析:成交带量 '),LINETHICK3,color33ffcc,ALIGN2;
IF hsl>=8 and hsl<15 AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'个股活跃分析:成交放量 '),LINETHICK3,color33ffcc,ALIGN2;
IF hsl>=15 and hsl<25 AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'个股活跃分析:成交巨量 '),LINETHICK3,color33ffcc,ALIGN2;
IF hsl>25 AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'个股活跃分析:成交怪异 '),LINETHICK3,color33ffcc,ALIGN2;
zslife:=(ema(indexc,60)+ema(indexc,90))/2;
zsbl:=indexc/zslife;
gglife:=(ema(c,60)+ema(c,90))/2;
zstb:=zsbl*gglife;
rsv:=(c-llv(l,15))/(hhv(h,15)-llv(l,15))*100;
kk:=sma(rsv,10,1);
dd:=sma(kk,5,1);
zlcm:=intpart(sma(rsv,10,1));
shcm:=intpart(sma(kk,5,1));
IF (zlcm+shcm)>50 and (zlcm+shcm)<160 AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'精确风险系数%:'+NUMTOSTRN( (zlcm+shcm),2 )+' '),LINETHICK3,color6699cc,ALIGN2;
IF ((zlcm+shcm)<=50 or (zlcm+shcm)>=160) AND TJTS THEN DRAWTEXT(C>0,cg-1.1*j,'精确风险系数%:'+NUMTOSTRN( -(zlcm+shcm),2 )+' '),LINETHICK3,color6699cc,ALIGN2;
aa13:=ema(winner(c)*70,3);
bb13:=ema((winner(c*1.1)-winner(c*0.9))*80,3);
IF aa13>bb13 AND TJTS THEN DRAWTEXT(C>0,cg-2.1*j,'主力控盘系数%:'+NUMTOSTRN( aa13/(aa13+bb13)*100,2 )+' '),LINETHICK3,color0000ff,ALIGN2;
IF aa13
bs:=ema(c,21)-1+ema(v,5)/ema(v,40);
hs:=(bs-life)/life*100;
IF c>0 AND TJTS THEN DRAWTEXT(C>0,cg-3.1*j,'高潮乖离系数%:'+NUMTOSTRN(hs,2 )+' '),LINETHICK3,colorffffcc,ALIGN2;
hot:=ma(c,13);
glv:=atan(hot-ref(hot,1))*3.142*100;
IF c>0 AND TJTS THEN DRAWTEXT(C>0,cg-4.1*j,'股价倾斜系数%:'+NUMTOSTRN(glv,2 )+' '),LINETHICK3,colorff6666,ALIGN2;
IF c>0 AND TJTS THEN DRAWTEXT(C>0,cg-5.1*j,'历史价位系数%:'+NUMTOSTRN((c-llv(l,0))/(hhv(h,0)-llv(l,0))*100,2 )+' '),LINETHICK3,color33cc99,ALIGN2;
i:=0;
pdi:=sum(max(max(h-l,abs(h-ref(c,1))),abs(l-ref(c,1))),14);
mdi:=h-ref(h,1);
adx:=ref(l,1)-l;
adxr:=sum(if(mdi>0 and mdi>adx,mdi,0),14);
typ:=sum(if(adx>0 and adx>mdi,adx,0),14);
cci:=adxr*100/pdi;
wr:=typ*100/pdi;
mtm:=ma(abs(wr-cci)/(wr+cci)*100,6);
mtmma:=(mtm+ref(mtm,6))/2;
IF cross(cci,wr) AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'PDI线从下向上突破MDI线,显示有新多头进场,为买进信号 '),LINETHICK3,color0099ff,ALIGN2;i:=i+1 ;end;
IF cross(wr,cci) AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'PDI线从上向下跌破MDI线,显示有新空头进场,为卖出信号 '),LINETHICK3,colorff0000,ALIGN2;i:=i+1 ;end;
IF mtm>ref(mtm,1) AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'ADX值持续高于前一日,行情将维持原趋势 '),LINETHICK3,colorffff00,ALIGN2;i:=i+1 ;end;
IF mtm
DRAWTEXT(C>0,cg-(2.1+i)*j,'ADX值递减,降到20以下,且横向行进时,气氛为盘整 '),LINETHICK3,color00ffff,ALIGN2;i:=i+1 ;end;
IF mtmref(mtm,3) and ref(mtm,3)>ref(mtm,4) AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'ADX值从上升倾向转为下降时,表明行情即将反转 '),LINETHICK3,color0099ff,ALIGN2;i:=i+1 ;end;
lc:=(h+l+c)/3;
rsi1:=(lc-ma(lc,14))/0.015*avedev(lc,14);
rsi2:=-(100*(hhv(h,14)-c)/(hhv(h,14)-llv(l,14)));
IF rsi1<-180 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'CCI指标底位,买入机会 '),LINETHICK3,color00ffff,ALIGN2;i:=i+1 ;end;
IF rsi1>180 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'CCI指标高位,卖出机会 '),LINETHICK3,color00ff00,ALIGN2;i:=i+1 ;end;
IF v/capital>0.075 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'换手过大,小心主力出逃,短期头部 '),LINETHICK3,colorffff00,ALIGN2;i:=i+1 ;end;
IF rsi2>-20 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'W&R超买,短线即将见顶,应及时卖出 '),LINETHICK3,color00ffff,ALIGN2;i:=i+1 ;end;
IF rsi2<-80 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'W&R超卖,短线即将见底,应伺机买进 '),LINETHICK3,colorffff00,ALIGN2;i:=i+1 ;end;
psy:=c-ref(c,6);
布林1:=ma(psy,6);
IF cross(psy,布林1) and 布林1<-0.8 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'MTM从下向上突破MTMMA,买入信号 '),LINETHICK3,color00ff00,ALIGN2;i:=i+1 ;end;
IF cross(布林1,psy) and 布林1>0.8 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'MTM从上向下跌破MTMMA,卖出信号 '),LINETHICK3,color00ff00,ALIGN2;i:=i+1 ;end;
布林2:=ref(c,1);
布林3:=sma(max(c-布林2,0),6,1)/sma(abs(c-布林2),6,1)*100;
布林4:=sma(max(c-布林2,0),12,1)/sma(abs(c-布林2),12,1)*100;
IF 布林3>80 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'6日RSI向上突破85,超买,考虑卖出 '),LINETHICK3,colorffff00,ALIGN2;i:=i+1 ;end;
IF 布林3<15 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'6日RSI超卖,随时有可能反弹,考虑买入 '),LINETHICK3,colorffff00,ALIGN2;i:=i+1 ;end;
IF cross(布林3,15) AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'6日RSI向上突破15,买进信号 '),LINETHICK3,color00ffff,ALIGN2;i:=i+1 ;end;
IF cross(布林3,85) AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'6日RSI向下跌破85,卖出信号 '),LINETHICK3,color00ff00,ALIGN2;i:=i+1 ;end;
布林5:=count(c>ref(c,1),12)/12*100;
布林6:=(ma(c,3)+ma(c,6)+ma(c,12)+ma(c,24))/4;
布林7:=布林6+3*std(布林6,10);
xx:=布林6-3*std(布林6,10);
a001:=(布林7-xx)/布林7<0.03;
a002:=(布林7-xx)/布林7>0.18;
a003:=(ma(c,60)-ma(c,5))/ma(c,60)>0.15;
a004:=(ma(c,5)-ma(c,60))/ma(c,5)>0.15;
IF a001 AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'多空布林收敛中,有变盘的可能,上下自己分析 '),LINETHICK3,colorffff00,ALIGN2;i:=i+1 ;end;
IF a003 and a002 and c>o AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-(2.1+i)*j,'布林上下乖离太大,有反弹的可能 '),LINETHICK3,color00ffff,ALIGN2;i:=i+1 ;end;
IF a004 and a002 and c
IF h>=hhv(h,20) AND TJTS THEN BEGIN
DRAWTEXT(C>0,cg-1.1*j,'创20天新高 '),LINETHICK3,colorffff00,ALIGN2;end;