杠上开花
★和千均班长一起摸爬滚打!和朋友们摸爬滚打了!公开源码。★
我的指标大部份都在使用中逐步完善。本次升级加了TDX(50输出)实用的
自动趋势画线。为防有人拿指标骗人,加密不限时。
因精选指标中有同名标。操作应删除原有的〈杠上开花〉重新启动TDX再
套入,
一,有朋友说上次发的指标好看,看不出实用价值。实际上我编的指标主要还
在实用上。就拿〈杠上开花〉来说吧:K线的变色上杠上的手示足以示明
未来可能的走势。看盘中趋势重要,价位也同等重要。有的朋友看见涨势
很好,不知在实键价位上,买了就调整。当然好股还会上来,在时间上,
末来的因素很多,就不好说了。因此上次增加了小箱体和比较重要的两条
价位线(长出图外的两条线)。
信号我一般不用文字表示,主要用图标。为使分钟图上好用,图标离K线
位置也不太远。开花实际上就就是CCI主图中的'成应'。其它还有两个买
进和一个走人信号。
二,〈同舟共舞〉三种不同的变形KD和MACD组成。共舞的含意就在其中了。
KD不用说,房子实际上就是正MACD。负MACD就是电杆,只是MACD增大才
有。最长的电杆就是MACD负值最大的地方,过零还用说吗?
三,〈50_DDX,〉是在DDX指标中组合进"波段转向"和"顶底背离"。只要注意
观查,零轴下的倒山和零轴上的正山含意有根本的区别
{杠上开花 DZH2 }
input:n(4,1,255);
DRAWGBKLAST(CLOSE>0,STRIP(RGB(95,95,95),RGB(0,0,0),0));
wN:=N;{原码 N:=3;}
wA1:=REF(H,wN)=HHV(H,2*wN+1); wB1:=FILTER(wA1,wN);
wC1:=BACKSET(wB1,wN+1);
wD1:=FILTER(wC1,wN);{高点}
wA2:=REF(L,wN)=LLV(L,2*wN+1); wB2:=FILTER(wA2,wN);
wC2:=BACKSET(wB2,wN+1);
wD2:=FILTER(wC2,wN);{低点}
wR1:=BACKSET(DISPSTATUS=2,BARSLAST(wD1)+1); wS1:=wR1>REF(wR1,1); {前一高}
wT1:=BACKSET(DISPSTATUS=2,BARSLAST(wD2)+1); wU1:=wT1>REF(wT1,1); {前一低}
wR2:=BACKSET(wS1,REF(BARSLAST(wD1),1)+2); wS2:=wR2>REF(wR2,1); {前二高}
wT2:=BACKSET(wU1,REF(BARSLAST(wD2),1)+2); wU2:=wT2>REF(wT2,1); {前二低}
wR3:=BACKSET(wS2,REF(BARSLAST(wD1),1)+2); wS3:=wR3>REF(wR3,1); {前三高}
wT3:=BACKSET(wU2,REF(BARSLAST(wD2),1)+2); wU3:=wT3>REF(wT3,1); {前三低}
wR4:=BACKSET(wS3,REF(BARSLAST(wD1),1)+2); wS4:=wR4>REF(wR4,1); {前四高}
wT4:=BACKSET(wU3,REF(BARSLAST(wD2),1)+2); wU4:=wT4>REF(wT4,1); {前四高}
DRAWLINE(wS2,H,wS1,H,1),Color0000Ff; {★压力1:}
DRAWLINE(wU2,L,wU1,L,1),POINTDOT,Color0000FF;{★支撑1:}
DRAWLINE(wS3,H,wS2,H,1),Color888000; {★压力2:}
DRAWLINE(wU3,L, wU2,L,1),POINTDOT,Color888000;{★支撑2:}
{DRAWLINE(wS4,H,wS3,H,1),Color00ccCC;{★压力3:}
{DRAWLINE(wU4,L, wU3,L,1),POINTDOT,Color00ccCC;{★支撑3;}
平均成本:=COST(50);
获利盘:=WINNER(CLOSE)*100;
DRAWTEXTREL(20,400,'获利盘:'+获利盘+'% '),colormagenta;
DRAWTEXTREL(20,500,'平均成本:'+平均成本),colormagenta;
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,100,cw),COLOR0055FF;
DRAWTEXTREL(20,200,BKNAME),COLOR0055FF;
AA05:=MA(C,5);
五日乖离率:=(C-AA05)/AA05*100;
BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3);
AA10:=MA(C,10);
AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
AA30:=MA(C,30);
三拾日乖离率:=(C-AA30)/AA30*100;
VAR11:=(AA20-AA30)>REF((AA20-AA30),1)
AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);
VAR22:=(AA30-AA20)<REF((AA30-AA20),1) AND AA20<REF(AA20,1) AND
AA30<REF(AA30,1);
BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;
强势狙击:=FILTER(BB30>30 AND BB10>45 AND
CROSS(BB05,60),10);
加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND
AA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND
AA10>REF(AA10,1)
AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;
清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) AND
AA05<REF(AA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) AND
AA10<REF(AA10,1),10);
DRAWICON(加仓 ,LOW*0.99,9);
DRAWICON(清仓 ,HIGH*1.01,4);
DRAWICON(强势狙击 ,LOW*0.99,5);
VAR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
VAR2222:=CROSS(VAR1111,0.9);
VAR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
VAR4444:=CROSS(VAR3333,0.9);
压力: REF(HIGH,BARSLAST(Var2222)), POINTDOT,ColorEA91B5;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(Var2222)),REF(HIGH,BARSLAST(Var2222)),5,0),ColorEA91B5;
支撑: REF(LOW,BARSLAST(Var4444)), POINTDOT,Color00b4ff;
STICKLINE(CLOSE,REF(LOW,BARSLAST(Var4444)),REF(LOW,BARSLAST(Var4444)),5,0),Color00b4ff;
下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
aRSV:=SMA(下档线,3,1);
aK:=SMA(aRSV,3,1);
aD:=((3 * aRSV) - (2 * aK));
aJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);
aRSV24:=SMA(aJ12,3,1);
aK24:=SMA(aRSV24,3,1);
aD24:=((3 * aRSV24) - (2 * aK24));
撑压位:=IF(CROSS(aD24,aD),HIGH,REF(HIGH,BARSLAST(CROSS(aD24,aD)))){,LINETHICK2,COLORFFFFFF};
底:=LLV(HIGH,30){,COLOR00FF00,LINETHICK2};
STICKLINE(BARSTATUS=2 ,撑压位,撑压位,50,1),LINETHICK1,COLORFFFFFF;
DRAWTEXT(BARSTATUS=2 ,撑压位,' 撑压'),COLORFFFFFF,VALIGN1;
STICKLINE(BARSTATUS=2 ,底,底,50,1),COLOR00FF00,LINETHICK1;
DRAWTEXT(BARSTATUS=2 ,底,' 底线'),COLOR00FF00,VALIGN0;
TYP := (HIGH + LOW + CLOSE)/3;
CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,6));
差值1:=ABS(REF(CCI1,1)-CCI1);
CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));
差值2:=ABS(REF(CCI2,1)-CCI2);
CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));
差值3:=ABS(REF(CCI3,1)-CCI3);
CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
差值4:=ABS(REF(CCI4,1)-CCI4);
CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));
差值5:=ABS(REF(CCI5,1)-CCI5);
CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;
AAA:=(3*C+H+L+O)/6;
VAR1:=WMA(AAA,8);
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
短线:VAR1,COLORWHITE;
中线:VAR6,COLORYELLOW;
下跌:=IF(VAR1=VAR6,VAR6,0);
PARTLINE(VAR6,下跌=VAR6,RGB(0,255,0));
{条件1}
TJ1:= CCI1>差值4;
立桩量:=TJ1;
TJ2:=IF(BARSLAST(立桩量)=1 ,1,IF(BARSLAST(立桩量)=2 ,1,
IF(BARSLAST(立桩量)=3 ,1,0)));
三天法则1:=TJ2=1;
成立1:=三天法则1;
条件成立1:=FILTER(成立1,5);
TJ11:= cci1<-差值4 ;
立桩量2:=TJ11;
TJ22:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(HIGH,1),1,
IF(BARSLAST(立桩量2)=2 AND CLOSE>REF(HIGH,2),1,
IF(BARSLAST(立桩量2)=3 AND CLOSE>REF(HIGH,3),1,0)));
三天法则2:=TJ22=1;
成立2:=三天法则2;
条件成立2:=FILTER(成立2,5);
{条件2}
TJ111:=(ABS(CCI1)>CCI AND ABS( 差值1)> ABS(差值5)) |