分时实站.FNC
input:LONG(24,1,100),SHORT(13,1,100),M(6,1,100),N(6,1,100);
IF BARSTATUS=2 then
IF BARSTATUS=2 then
zg:=FINANCE2(35);{总股}
lta:=FINANCE2(37);{流通A}
sy:=FINANCE2(3);{收益}
sl:=DYNAINFO(39);{市盈率}
wf:=FINANCE2(8);{未分}
gj:=FINANCE2(7);{公积};
jz:=FINANCE2(4);{净资}
cw:='总股:'+zg+' 流通A:'+lta+' 收益:'+sy+' 市盈率:'+sl+' 未分:'+wf+' 公积:'+gj+' 净资:'+jz;
DRAWTEXTREL(20,690,BKNAME),COLOR0055FF;
DRAWTEXTREL(20,760,cw),COLOR0055FF;
rcc:=DYNAINFO(3);
s2:=sma(c,3,1);
s6:=sma(c,5,1);
dk:=10*(s2-s6);
kk:=IF(DATATYPE=8,0.95,1);
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
DIF:=(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG));
DEA:=(EMA(DIF,M));
MACD:=5*(DIF-DEA);
A4:=BARSLAST(ref(cross(dif,dea),1));
B1:=ref(c,A4+1)>c and ref(dif,A4+1)<dif and cross(dif,dea);
DRAWTEXT(FILTER(B1>0,5),rcc*kk-0.025*rcc*kk,'背离'),COLORyellow;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),rcc*kk,MACD*5+rcc*kk,3,0),COLORFF00FF,LINETHICK3;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),rcc*kk,MACD*5+rcc*kk,3,0),COLORblue,LINETHICK3;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),rcc*kk,MACD*5+rcc*kk,3,0),COLOR4ABEFF,LINETHICK3;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),rcc*kk,MACD*5+rcc*kk,3,0),COLORblue,LINETHICK3;
STICKLINE(dk>0,rcc*kk,rcc*kk+dk,0,1),COLORRED;
STICKLINE(dk<0,rcc*kk,rcc*kk+dk,0,1),COLORCYAN;
Q:10*(DEA-DIF)+rcc*kk,COLORFF9933,LAYER0;
MACD超跌:=COUNT((DIF<DEA),10)=10;
Q1:5*MACD超跌 * "MACD.MACD"(LONG,SHORT,M)+rcc*kk,COLORFF00FF,LINETHICK2,LAYER0;
MACD金叉:=CROSS(DIF,DEA);
DTPL:=MA10>MA30 AND MA20>MA30 AND MA30>REF(MA30,1);
关注:(MACD金叉 AND REF(Q1,1) < rcc*kk)*-0.1,LINETHICK0;
均线:(DTPL AND MA5>MA30 AND MA5<MA10)*-0.015*5+rcc*kk,colorFF89B2,LINETHICK1,PRECIS2,DOTLINE;
偏离:(C<MIN(MA20*1.05,MA30*1.1) AND C>MA30)*0.015*5+rcc*kk,COLOR009900,LINETHICK1,PRECIS2,DOTLINE;
DRAWTEXT(关注=-0.1,-0.015*15+rcc*kk,'GZ'),color00ff00,align1,LAYER0;
BDGD:=C=HHV(C,20);
GDSJ:=BARSLAST(BDGD);
目标:IF(均线<rcc*kk AND 偏离>rcc*kk AND GDSJ>=N,0.05*5+rcc*kk,rcc*kk),COLORffff00,POINTDOT,PRECIS1,LINETHICK3;
MBSJ:=BARSLAST(目标);
MAV5:=EMA(V,5);
MAV10:=EMA(V,10);
LNMACD:=((V-MAV5)/MAV5*2+(V-MAV10)/MAV10)*10;
量坑:=LNMACD<=-10;
优选:=目标>rcc*kk AND COUNT(量坑,3)>=1;
DRAWICON(优选,-0.02*5+rcc*kk,12);
N15HIGH:=REF(HIGH,6);
N1LOW:=REF(LOW,1);
DRAWTEXT((((((CROSS(MA(CLOSE,13),MA(CLOSE,24)) > 0) AND (((N15HIGH - N1LOW) / N1LOW) <
0.15)) AND (OPEN >= MA(CLOSE,13))) AND (CLOSE >= MA(CLOSE,13))) AND (LOW <= MA
(CLOSE,13))),0.05*5+rcc*kk,'^回头望月'),color0099CC;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<rcc*kk AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,rcc*kk,0.02*5+rcc*kk,4,0),Color00FFFF;
DRAWTEXT(二次金叉,0.04*5+rcc*kk,' 二金'),ColorYELLOW;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
周K:=MA("KDJ.K#WEEK"(9,3,3) ,5);
周D:=MA("KDJ.D#WEEK"(9,3,3) ,5);
周J:=MA("KDJ.J#WEEK"(9,3,3) ,5);
DRAWICON(k<20 and cross(k,d),MACD*5+rcc*kk,1),align2;
HH:=MA(CLOSE,10);
GG:=MA(CLOSE,12);
上:=ema((MA(HIGH,3) * 1.05),30);
下:=ema((MA(LOW,3) * 0.96),30);
决战:STICKLINE((((CROSS(DIF,DEA) AND ((下 - REF(下,1)) > 0)) AND (MACD >= REF(MACD,1))) AND
(DIF < 0)),DIF*5+rcc*kk,rcc*kk+0.02*rcc*kk,8,0),color0000FF;
DRAWTEXT((((CROSS(DIF,DEA) AND ((下 - REF(下,1)) > 0)) AND (MACD >= REF(MACD,1))) AND (DIF
<= 0)),rcc*kk+0.03*rcc*kk,'DIF金叉'),color0000FF;
STICKLINE(FILTER(((((MACD >= REF(MACD,5)) AND ((下 - REF(下,1)) > 0)) AND (MACD <= 0)) AND
((GG - REF(GG,1)) >= 0)),3),rcc*kk,rcc*kk+0.03*rcc*kk,1,0),color00FF00;
DRAWTEXT(FILTER(((((MACD >= REF(MACD,5)) AND ((下 - REF(下,1)) > 0)) AND (MACD <= 0)) AND
((GG - REF(GG,1)) >= 0)),3),rcc*kk+0.035*rcc*kk,'绝买'),color00FF00;
CC:C,LINETHICK2,COLORFFFFFF,LAYER0;
rccd:=rcc*0.92;
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);
V4:=2*(V2-V3)*5.5;
庄秘撤: IF(V4<=0,V4,0),COLOR00FF00,LINETHICK0;
庄秘进: IF(V4>=0,V4,0),COLORFF00FF,LINETHICK0;
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
大筹金进场: IF(VB>=0,VB,0),COLORYELLOW,LINETHICK0;
大筹金撤走: IF(VB<=0,VB,0),COLORBLUE,LINETHICK0;
faa:=WINNER(CLOSE+CLOSE*15/100)*100;
fbb:=WINNER(CLOSE+CLOSE*0/100)*100;
fcc:=faa-fbb;
fdd:=(WINNER(CLOSE-CLOSE*0.1/100)-WINNER(CLOSE-CLOSE*15/100))*100;
fee:=fcc<3 and fdd<0.5 and OPEN<>LOW;
fa1:=DYNAINFO(6);
fa2:=IF(LOW>fa1,0,IF(HIGH<fa1,1,(fa1-LOW+0.01)/(HIGH-LOW+0.01)));
fa3:=VOL/WINNER(LOW);
fa4:=REF(HHV(CLOSE,120),1);
fa5:=REF(LLV(CLOSE,120),1);
fa6:=100*(CLOSE-fa5)/(fa4-fa5);
fa7:=fa2>0 or fa2=1;
fa8:=fa7 and fa3/REF(fa3,3)>=3 and fa6<80;
fa9:=REF(fa8,1) or REF(fa8,2) or REF(fa8,3) or REF(fa8,4);
fa10:=fa8 and fa9;
fa11:=IF(FILTER(fa8,3),5,0);
fa12:=IF(FILTER(fa10,3) or fee,10,0);
筹码进场日:IF(fa11,8,0),LINETHICK0;
筹码加仓日:IF(fa12,15,0),LINETHICK0;
eeee:=(rcc-rccd)/20;
DRAWTEXT(fa11,rccd+5*eeee,'↑筹码进场'),COLOR00FFFF;
DRAWTEXT(fa12,rccd+8*eeee,',↑筹码加仓');
fVar1:=REF(LOW,1);
fVar2:=SMA(ABS(LOW-fVar1),13,1)/SMA(MAX(LOW-fVar1,0),13,1);
fVar3:=EMA(fVar2,13);
fVar4:=LLV(LOW,34);
fVar5:=EMA(IF(LOW<=fVar4,fVar3,0),3);
主力进场:
STICKLINE(fVar5>REF(fVar5,1),rccd,rccd+fVar5*eeee,10,0 ),COLORRED,LAYER7;
洗盘:IF(fVAR5<REF(fVAR5,1),fVAR5,0),COLORGREEN,LINETHICK0;
STICKLINE(fVAR5<REF(fVAR5,1),rccd,rccd+fVAR5*eeee,2,1),COLORGREEN;
fVar6:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-
LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
fVar7:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV
(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
fVar8:=fVar6<REF(fVar7,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(fVar8 AND COUNT(fVar8,30)=1,rccd+3*eeee,'★有迹进筹');
|