1.kdj��ɫ��ͼָ��Դ��
2.请老师帮我编写一个KDJ指标的变标源变色底部背离选股公式?
kdj��ɫ��ͼָ��Դ��
通达信主图变色龙:
SH:=EMA(HIGH,3)*(1+3/);
XL:=EMA(LOW,3)*(1-3/);
龙王线:(SH+XL)/2,COLORYELLOW,LINETHICK5;
黄金线:HHV(龙王线,6),COLORMAGENTA,LINETHICK5;
支撑线:EMA(C,),COLORRED,LINETHICK5;
STICKLINE(龙王线<REF(龙王线,1),龙王线,REF(龙王线,3),6,0),COLORBLUE;
STICKLINE(黄金线>REF(黄金线,1),黄金线,REF(黄金线,3),6,0),COLORRED;
指标用法:
(1)出现(蓝色)K线,是进入空头(弱势).
(2)出现(红色)K线,是进入多头(强势).
(3)当黄金线(粉色)转为龙王线(**)时,此时为减仓或暂时退出.
(4)当龙王线(**)和股价(蓝色)K线,跌破支撑线(红色)时,此时为清仓信号.
副图变色龙趋势:
VAR2:=(CLOSE-LLV(LOW,))/(HHV(HIGH,)-LLV(LOW,))*;
VAR3:=SMA(SMA(VAR2,3,1),3,1)/.;
VAR4:=EMA(VAR3,5);
VAR5:=3*VAR3-2*VAR4;
AAA:=CROSS(VAR5,VAR3) AND VAR3<2.1 AND C>O;
VAR6:=(2*CLOSE+HIGH+LOW)/4;
VAR7:=LLV(LOW,);
VAR8:=HHV(HIGH,);
VAR9:=EMA((VAR6-VAR7)/(VAR8-VAR7)*,);
VARA:=EMA(0.*REF(VAR9,1)+0.*VAR9,2);
多:VAR9,COLORBLUE,POINTDOT;
空:EMA(0.*REF(VAR9,2)+0.*VAR9,),COLORYELLOW;
STICKLINE(VAR9>VARA,VAR9,VARA,6,0),COLORBLUE;
STICKLINE(VAR9<=VARA,VAR9,VARA,6,0),COLORYELLOW;
Y:=(H+O+L+3*C)/6;
X:=EMA(-(/(1+SUM(IF(Y>REF(Y,1),Y*VOL,0),)/SUM
(IF(Y<REF(Y,1),Y*VOL,0),))),5),COLORBLUE;
A1:=,COLORWHITE;
A2:=,COLORWHITE;
A3:=,COLORFF;
A4:=,POINTDOT;
A5:=,COLORRED; MA5:=MA(C,5);
MA6:=MA(C,6);
MA:=MA(C,);
MA:=MA(C,);
A2M:=REF(MA,1);
J1:=(MA-A2M)/A2M*;
MJ1:=MA(J1,3);
MA:=MA(C,);
MA:=MA(C,);
MA:=MA(C,);
乖离2:=(MA-MA)/MA*;
VAR1:=IF(BETWEEN(乖离2,-2,5),2,0);
MAX1:=MAX(MA,MA);
MAX2:=MAX(MAX1,MA);
MIN1:=MIN(MA,MA);
MIN2:=MIN(MIN1,MA);
K1:=(MAX2/MIN2-1)*;{ 粘合度符合条件}
VAR2N:=IF(K1<=8,1,0);
短线暴张:DRAWTEXT(FILTER( (VAR1 OR VAR2N) AND MA>REF(MA,1) AND COUNT(MA>REF(MA,1),3)=3 AND MA>MA AND COUNT(CROSS(MA5,MA),3) AND J1>MJ1 AND MA(V,5)>MA(V,)
AND MA(V,)>REF(MA(V,),1),5),,'暴张'),COLORYELLOW;
DRAWTEXT(CROSS("KDJ.K"(5,2,3),"KDJ.D"(5,2,3)) AND "KDJ.D"(5,2,3)< AND J1>MJ1 AND MA>REF(MA,1) AND COUNT(J1<1,3)>=1 ,,'买入'),COLORWHITE;
XL1:=((LLV(LOW,3) = LLV(LOW,)) AND ((CLOSE / REF(CLOSE,1)) >= 1.));
XL2:=(((CLOSE - EMA(CLOSE,)) / EMA(CLOSE,)) * );
XL3:=CROSS(XL2,(0 - ));
DRAWTEXT(FILTER(((XL1 > 0) AND LOW),5),,'买点'),COLORBLUE;
DRAWTEXT((XL3 > 0),,'底部'),COLORYELLOW;
X6:=REF(CLOSE,1);
X7:=((SMA(MAX((CLOSE - X6),0),7,1) / SMA(ABS((CLOSE - X6)),7,1)) * );
X8:=CROSS(,X7);
X9:=FILTER(X8,4);
DRAWTEXT(X9, ,'出货'),COLORF5;
VARQ1:=(CLOSE-MA(CLOSE,))/MA(CLOSE,)*;
VARQ2:=(CLOSE-LLV(LOW,))/(HHV(HIGH,)-LLV(LOW,))*;
VARQ3:=SMA(VARQ2,2,1);
天:=+(-ABS(VARQ1)),COLORRED;
下:=SMA(VARQ3,2,1);
选股2:=IF(CROSS(下,),1,0);
DRAWICON((CROSS(下,) ),,1);
V1:=EMA(CLOSE,)-EMA(CLOSE,);
V2:=EMA(V1,);
V3:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*;
操盘线:=SMA(V3,2,1),LINETHICK3;
V5:=SMA(操盘线,2,1);
抄底:=IF(操盘线>REF(操盘线,1) AND REF(操盘线,1)<REF(操盘线,2) AND 操盘线< ,,0),COLORYELLOW,LINETHICK3;
追买:=IF(操盘线>REF(操盘线,1) AND CROSS(操盘线,V5) AND V5<,8,0),COLORRED;
大智慧主图变色龙:
INPUT:M(,1,,1);
止盈线:(MA(CLOSE,M) * 1.),ColorFF;
分水岭:(MA(CLOSE,M) * 1),COLORWHITE;
止损线:(MA(CLOSE,M) * 0.),ColorFF;
总股本:=FINANCE2() ;
流通股:=FINANCE2();
限售A股:=FINANCE2();
每股收益:=FINANCE2(3);
市盈率:=DYNAINFO();
每股公积金:=FINANCE2(7);
所属板块:=BKNAME;
DRAWTEXTABS(,, '所属板块: '+所属板块),COLORYELLOW;
DRAWTEXTABS(,,'每股收益: '+NUMTOSTRN(每股收益,3)+'元 利润增长:'+FINANCE2()+'% 市盈率:'+NUMTOSTRN(市盈率,1)+'倍 '+' 每股公积金:'+NUMTOSTRN(每股公积金,2)+'元'),COLORYELLOW;
DRAWTEXTABS(,,'总 股 本: '+NUMTOSTRN(总股本,2)+'万股'+' 流通A股:'+NUMTOSTRN(流通股,2)+'万股'+' 限售A股:'+NUMTOSTRN(限售A股,2)+'万股'),COLORYELLOW;
{ }
x9:FORCAST(c,9),Colorwhite,LINETHICK2;
llx:=llv(FORCAST(c,9),2);
DRAWGBKLAST(DYNAINFO(3)<DYNAINFO(7){ OPEN},STRIP(RGB(0,,0),RGB(,0,0),1));
DRAWGBKLAST({ CLOSE}DYNAINFO(3)>DYNAINFO(7){ OPEN},STRIP(RGB(,0,0),RGB(0,,0),1));
DRAWTEXTREL(,,STKLABEL+' '+STKNAME+' '+DYNAINFO(7)+'元'+' '+DYNAINFO()*+'%'),LINETHICK4,COLORFFFF;
PARTLINE(x9,x9=llx,rgb(,,0),x9<>llx,rgb(,0,0)),linethick4;
{ }
{ 柱图}
STICKLINE(c>=o and o<>0,HIGH,LOW,0.5,0),colorCD;
STICKLINE(c>=o and o<>0,CLOSE,OPEN,8,0),color;
STICKLINE(c>=o and o<>0,CLOSE,OPEN,7,0),colorA3;
STICKLINE(c>=o and o<>0,CLOSE,OPEN,6,0),colorB7;
STICKLINE(c>=o and o<>0,CLOSE,OPEN,5,0),colorCD;
STICKLINE(c>=o and o<>0,CLOSE,OPEN,4,0),colorE9;
STICKLINE(c>=o and o<>0,CLOSE,OPEN,2,0),colorE9;
STICKLINE(c>=o and o<>0,CLOSE,OPEN,0.5,0),ColorB8FF;
STICKLINE(c<o and o<>0,HIGH,LOW,0.5,0),colorFFBE;
STICKLINE(CLOSE<OPEN and OPEN<>0,HIGH,LOW,0.5,0),colorFFBE;
STICKLINE(CLOSE<OPEN and OPEN<>0,CLOSE,OPEN,8,0),ColorCA;
STICKLINE(CLOSE<OPEN and OPEN<>0,CLOSE,OPEN,7,0),ColorE;
STICKLINE(CLOSE<OPEN and OPEN<>0,CLOSE,OPEN,6,0),ColorF;
STICKLINE(CLOSE<OPEN and OPEN<>0,CLOSE,OPEN,5,0),ColorFFB;
STICKLINE(CLOSE<OPEN and OPEN<>0,CLOSE,OPEN,4,0),ColorFF;
STICKLINE(CLOSE<OPEN and OPEN<>0,CLOSE,OPEN,2,0),ColorFFA;
STICKLINE(CLOSE<OPEN and OPEN<>0,CLOSE,OPEN,0.5,0),colorFFFF;
{ }
DRAWGBK(c,'7' );
Var3:=LLV(H,);
Var4:=*(C-Var3)/Var3;
Var5:=(C-LLV(L,))/(HHV(H,)-LLV(L,))*;
Var6:=(C-LLV(C,))/(HHV(C,)-LLV(C,))*;
{ Var7:=0;}
Var8:=MA(HHV(C-REF(C,1),0),)/MA(ABS(C-REF(C,1)),7)*;
Var9:=MA(HHV(C-REF(C,1),0),)/MA(ABS(C-REF(C,1)),)*;
VarA:=BARSCOUNT(C);
VarB:=Var8< AND Var9< AND VarA>;
VarC:=VarB AND COUNT(VarB,1)=1;
VarD:=EMA(C,)-EMA(C,8);
VarE:=EMA(VarD,5);
VarF:=TROUGH(3,6,1)<4 AND CROSS(VarD,VarE);
Var:=IF(TROUGH(3,,1)=0 AND H>L+0.,4,0);
Var:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
Var:=ZIG(3,6)<REF(ZIG(3,6),1)AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
Var:=ZIG(3,)>REF(ZIG(3,),1)AND REF(ZIG(3,),1)<=REF(ZIG(3,),2)AND REF(ZIG(3,),2)<=REF(ZIG(3,),3);
Var:=ZIG(3,)<REF(ZIG(3,),1)AND REF(ZIG(3,),1)>=REF(ZIG(3,),2)AND REF(ZIG(3,),2)>=REF(ZIG(3,),3);
Var:=ZIG(3,)>REF(ZIG(3,),1)AND REF(ZIG(3,),1)<=REF(ZIG(3,),2) AND REF(ZIG(3,),2)<=REF(ZIG(3,),3);
Var:=ZIG(3,)<REF(ZIG(3,),1)AND REF(ZIG(3,),1)>=REF(ZIG(3,),2)AND REF(ZIG(3,),2)>=REF(ZIG(3,),3);
Var:=ZIG(3,)>REF(ZIG(3,),1) AND REF(ZIG(3,),1)<=REF(ZIG(3,),2)AND REF(ZIG(3,),2)<=REF(ZIG(3,),3);
Var:=ZIG(3,)<REF(ZIG(3,),1) AND REF(ZIG(3,),1)>=REF(ZIG(3,),2)AND REF(ZIG(3,),2)>=REF(ZIG(3,),3);
Var:=EMA(C,2)-EMA(C,);
Var1A:=EMA(Var,);
Var1B:=2*(Var-Var1A);
Var1C:=POW(Var1B,3)*0.1+POW(Var1B,1);
Var1D:=SQRT(SQRT(L*H*O*C));
Var1E:=EMA(Var1D*0.,3);
Var1F:=(H+L+C)/3;
Var:=(Var1F-MA(Var1F,))/(0.*AVEDEV(Var1F,));
Var:=CROSS(Var1E,L);
买点1:=Var;
买点2:=(Var+Var+Var+Var);
卖点1:=(Var+Var+Var+Var);
{ 股旁网-股票公式网站 www.guPang.com}
Var:=买点1 AND VarF AND VarC AND Var AND Var4<0AND Var5=0 AND Var6=0 AND Var<(-);
DRAWTEXT(买点1>0,L-0.,'B'),LINETHICK4,ALIGN1,colorred;{ B}
DRAWTEXT(买点2>0,L-0.,{ 'B'}'买'),LINETHICK4,ALIGN1,COLORFFFF;{ B}
DRAWTEXT(卖点1>0,H+0.,{ 'S'}'卖'),LINETHICK4,ALIGN1,COLORFF;{ S}
{ }
{ 十字光标提示}
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"),);
d2:=max("ddx.ddx"/d1+7.5,7.5);
d3:=min("ddx.ddx"/d1,);
fb:=if(s1=0,hs,ls);
tr0:=ifs(p1=1,'明日收盘价<'+numtostrn(udd,2)+',出现“卖”点\n','若明日收盘价>'+numtostrn(upp,2)+',出现“买”点\n');{ 1.BS点:}
tr1:=ifs(s1=1,'明日收盘价<'+numtostrn(ls,2)+',短线卖出机会','若明日收盘价>'+numtostrn(hs,2)+'短线买入机会');{ 2.短线:}
tr2:=ifs(p1=1,ifs(cross(p1,0),'“买”点','持股'),ifs(cross(1,p1),'“卖”点','持币'));{ 1.BS点:}
tr3:=ifs(s1=0,'向下,','向上,');{ 2.短线:}
tr4:='3.能量级别:'+numtostrn(d3,1)+'级';{ 3.能量级别:}
{ }
c1:=INTPART(cyc(5)**0.)/;
p2:=intpart(ref(cyc(5),1)*)/;
p3:=intpart(ref(cyc(5),1)*0.*)/;
vv:=intpart(min(capital*0.,ref(ma(vol,),1))/);
p:=intpart(maxcyc*)/;
p:=intpart(ref(MAXCYC,1)*)/;
p4:=p1=0 and c>p2 or (ref(vol/,1)<vv and c>intpart(p2*0.*)/ and vol>min(capital*0.,ref(ma(vol,),1)));
p5:=p1=1 and c<min(p3,p);
p1:=if(p4=1,1,if(p5=1,0,ref(p1,1)));
DRAWFLAGTEXT(p1=0 and (c1*0.-c)/c>0.1,c,'持币');{ 4.}
DRAWFLAGTEXT(p1=0 and (c1*0.-c)/c<=0.1 and ref(vol/,1)<vv,c,'明日收盘价超过'+str(c1)+';或收盘价超过 '+str(intpart(c1*0.*)/)+'且成交量大于'+str(vv)+'买入');
DRAWFLAGTEXT(p1=0 and (c1*0.-c)/c<=0.1 and ref(vol/,1)>=vv,c,'明日收盘价超过'+str(c1)+'买入');
DRAWFLAGTEXT(p1=1 and (c-min(c1,p))/min(c1,p)>0.1 ,c,'持股');
DRAWFLAGTEXT(p1=1 and (c-min(c1,p))/min(c1,p)<=0.1 ,c,'明日收盘价跌破'+str(min(c1,p))+'卖出');
{ }
bs:='<*t=F7*><*c=FFFFFF*><*p=*>'+datestr(date)+' 买卖点决策系统提示\n'+'<*t=E7FFFF*><*c=*><*p=*>'+'1.BS 点:'+tr2+','+tr0+'<*t=E7FFFF*><*c=*><*p=*>'+'2. 短线:'+tr3+tr1+'\n'+'<*t=E7FFFF*><*c=*><*p=*> '+tr4;
drawflagtext(1,fb,bs);
DRAWTEXTREL(,0,'变色龙'),COLORYELLOW;
请老师帮我编写一个KDJ指标的底部背离选股公式?
既然是kdj底背离公式,需要说明的色主bat源码大全是两个底的确认条件是什么,也就是指标小世界源码如何确认这两个低点的条件,有了确认低点的公式nmon源码分析条件才好编写公式。例如下图的变标源变色劲舞贝贝源码kdj底背离主图指标副图指标与选股指标效果。
色主html课表源码色主html课表源码2024-12-22 12:16
2024-12-22 11:38
2024-12-22 11:26
2024-12-22 11:07
2024-12-22 10:07
2024-12-22 09:46