您现在的位置:程序化交易>> 股票公式>> 其他>> 其他软件公式>>正文内容

CZWB CZWG CZWH三个主图指标公式公式[其他软件公式]

相关标签:

 

炒着玩的三个主图公式

 

 

 

原理解析:


 

 来源:程序化99( WWW.CXH99.COM )

源码:

 

 


CZW-B

 

{N1: 7; 1; 100}
A03:=DATATYPE;
A08:=MA(CLOSE, 20);
A0A:=IF(A03=2 ,"CDP.Al#MIN1" ,IF(A03=3 ,"CDP.Al#MIN5" ,IF(A03=4 ,"CDP.Al#MIN15" ,IF(A03=5 ,"CDP.Al#MIN30" ,IF( A03=6,"CDP.Al#MIN60" ,IF(A03=7 ,"CDP.Al#DAY" ,IF(A03=8 ,"CDP.Al#WEEK" , IF(A03=9 ,"CDP.Al#MONTH" ,"CDP.Al#DAY" ))))))));
A0B:=IF(A03=2 ,"CDP.AH#MIN1" ,IF(A03=3 ,"CDP.AH#MIN5" ,IF(A03=4 ,"CDP.AH#MIN15" ,IF(A03=5 ,"CDP.AH#MIN30" ,IF( A03=6,"CDP.AH#MIN60" ,IF(A03=7 ,"CDP.AH#DAY" ,IF(A03=8 ,"CDP.AH#WEEK" , IF(A03=9 ,"CDP.AH#MONTH" ,"CDP.AH#DAY" ))))))));
A09:=IF(A03=2 ,"CDP.CDP#MIN1" ,IF(A03=3 ,"CDP.CDP#MIN5" ,IF(A03=4 ,"CDP.CDP#MIN15" ,IF(A03=5 ,"CDP.CDP#MIN30" ,IF( A03=6,"CDP.CDP#MIN60" ,IF(A03=7 ,"CDP.CDP#DAY" ,IF(A03=8 ,"CDP.CDP#WEEK" , IF(A03=9 ,"CDP.CDP#MONTH" ,"CDP.CDP#DAY" ))))))));
A0C:=IF((A08>REF(A08,1)),A09,A0B);
A0D:=IF((A08<REF(A08,1)),A0A,A09);
A0E:=IF((A08>REF(A08,1)),A0C,A0D);
A12:=MA(A0E,10);
voo:=month<>ref(month,1);
vd11:=barslast(voo);
vd22:=ref(vd11,vd11+1);
ccc:=ref(c,vd11+1);
koo:=ref(o,vd22+1);
hhh:=hhv(ref(h,1),vd22);
lll:=llv(ref(l,1),vd22);
vo:=weekday=1;
vd1:=barslast(vo);
vd2:=ref(vd1,vd1+1);
cc:=ref(c,vd1+1);
ko:=ref(o,vd2+1);
hh:=hhv(ref(h,1),vd2);
ll:=llv(ref(l,1),vd2);
周收阳:IF(vo and cc>ko,l,h),colorred,linethick0;
STICKLINE(vo and cc>ko,h,l,0,1),colorred;
STICKLINE(vo and cc>ko,o,c,4,1),colorred;
周收阴:IF(vo and cc<=ko,l,h),colorFFFF52,linethick0;
STICKLINE(vo and cc<=ko,h,l,0,1),colorFFFF52;
STICKLINE(vo and cc<=ko,o,c,4,0),colorFFFF52;
月收阳:if(voo and ccc>koo,l,h),colorff00ff,linethick0;
STICKLINE(voo and ccc>koo,h,l,0,1),colorff00ff;
STICKLINE(voo and ccc>koo,o,c,4,1),colorff00ff;
月收阴:if(voo and ccc<=koo,l,h),color00ff00,linethick0;
PARTLINE(A0E>=REF(A0E,5),A0E),COLORYELLOW;
PARTLINE(A0E< REF(A0E,5),A0E),COLORMAGENTA;
PARTLINE(A12>=REF(A12,1),A12),COLORMAGENTA,linethick2;
PARTLINE(A12<REF(A12,1),A12),COLORGREEN,linethick2;
STICKLINE(voo and ccc<=koo,h,l,0,1),color00ff00;
STICKLINE(voo and ccc<=koo,o,c,4,0),color00ff00;
上市年:REF(YEAR,BARSCOUNT(C)-1),LINETHICK0,COLORGREEN;
月:REF(MONTH,BARSCOUNT(C)-1),LINETHICK0,COLORMAGENTA;n2:=sysparam(3);
n:=n2-sysparam(2)+1;
hh:=hhv(H,n);
ll:=llv(L,n);
K2:hh[n1];
K1:ll[n1];
aa1:=AMOUNT/vol;
bb1:=l<aa1*0.9;
cc1:=(c-ref(c,1))/ref(c,1)*100>1.2;
dd1:=l<ma(c,5)*0.921;
ee1:=vol<ma(v,5)*1.5;
ff1:bb1 and cc1 and dd1 and ee1,linethick0;
drawtext(ff1,l*0.995,'老鼠仓'),color00ff00;
stickline(ff1,h,l,0.5,0),color00ff00;
stickline(ff1,o,c,6,1),linethick2,color00ff00;
DRAWTEXT(l>REF(H,1),REF(H,1),'←<'),COLORRED;{//上涨缺口}
DRAWTEXT(h<REF(L,1),REF(L,1),'←<'),COLORGREEN;{//下跌缺口}
Varr1:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
DRAWICON(CROSS(82,Varr1),HIGH*1.002,2),ALIGN1;
DRAWTEXT(CROSS(82,Varr1),HIGH*1.005,'▲风险↓'),coloryellow,ALIGN2;aaa:=BARSCOUNT(c);
aah:=hhv(h,200);
aal:=llv(l,200);
ab0:=(aah-aal)/40;
ab1:=h+ab0;
ab2:=l-ab0;
stickline((aaa+0)/34=FLOOR((aaa+0)/34),ab2,ab2-3*ab0,3,0),COLORYELLOW;
drawtext((aaa+0)/34=FLOOR((aaa+0)/34),ab2-2*ab0,'时间窗'),COLORFFFFFF;
VVar1:=WINNER(CLOSE);
VVar2:=VOL/CAPITAL;
VVar3:=VVar2/VVar1;
财神线:=IF(VVar1<N1/100 ,VVar3,0);
DRAWICON(财神线>1,k1,8),align1;
DRAWICON(财神线<REF(财神线>1,1) AND 财神线>0.5 and 财神线<1,k1,9),align1;
Var1:=EMA(CLOSE,30)-EMA(CLOSE,17);
Var2:=EMA(Var1,5);
DRAWTEXT(CROSS(Var1,Var2) AND TROUGHBARS(3,7,1)<1,L*0.993,'震◎仓'),ALIGN0,COLORYELLOW;
A1:=BARSLAST(ref(cross("macd.diff","macd.dea"),1));
B1:=ref(c,A1+1)>c and ref("macd.diff",A1+1)<"macd.diff" and cross("macd.diff","macd.dea");
DRAWTEXT(FILTER(B1>0,5),l-0.01,'MACD底背'),COLORGREEN;
A2:=BARSLAST(ref(cross("kdj.k","kdj.d"),1));
B2:=ref(c,A2+1)>c and ref("kdj.k",A2+1)<"kdj.k" and cross("kdj.k","kdj.d");
DRAWTEXT(FILTER(B2>0,5),l-0.02,'KDJ底背'),COLORYELLOW;
A3:=BARSLAST(ref(cross("RSI.RSI1","RSI.RSI2"),1));
B3:=ref(c,A3+1)>c and ref("RSI.RSI1",A3+1)<"RSI.RSI1" and cross("RSI.RSI1","RSI.RSI2");
DRAWTEXT(FILTER(B3>0,5),l*0.98,'RSI底背'),COLORCYAN;
C1:=BARSLAST(ref(cross("macd.dea","macd.diff"),1));
D1:=ref(c,C1+1)<c and ref("macd.diff",C1+1)>"macd.diff" and cross("macd.dea","macd.diff");
DRAWTEXT(FILTER(D1>0,5),h+0.04,'MACD顶背'),COLORwhite,ALIGN2;
C2:=BARSLAST(ref(cross("kdj.d","kdj.k"),1));
D2:=ref(c,C2+1)<c and ref("kdj.k",C2+1)>"kdj.k" and cross("kdj.d","kdj.k");
DRAWTEXT(FILTER(D2>0,5),h+0.06,'KDJ顶背'),COLORwhite,ALIGN2;
C3:=BARSLAST(ref(cross("RSI.RSI2","RSI.RSI1"),1));
D3:=ref(c,C3+1)<c and ref("RSI.RSI1",C3+1)>"RSI.RSI1" and cross("RSI.RSI2","RSI.RSI1");
DRAWTEXT(FILTER(D3>0,5),h+0.08,'RSI顶背'),COLORMAGENTA,ALIGN2;AC:=C;
AH:=H;
AL:=L;
AO:=O;
STICKLINE(AC>=AO,AH,AC,1,0),color225588;
STICKLINE(AC>=AO,AH,AC,0,0),color66ccff;
STICKLINE(AC>=AO,AO,AL,1,0),color225588;
STICKLINE(AC>=AO,AO,AL,0,0),color66ccff;
STICKLINE(AC>AO,AC,AO,8,0),COLOR225588;
STICKLINE(AC>AO,AC,AO,7,0),COLOR226699;
STICKLINE(AC>AO,AC,AO,6,0),COLOR3377aa;
STICKLINE(AC>AO,AC,AO,5,0),COLOR3388bb;
STICKLINE(AC>AO,AC,AO,4,0),COLOR4499cc;
STICKLINE(AC>AO,AC,AO,3,0),COLOR44aadd;
STICKLINE(AC>AO,AC,AO,2,0),COLOR55bbee;
STICKLINE(AC>AO,AC,AO,1,0),COLOR66ccff;
STICKLINE(AC<=AO,AH,AC,1,0),color888800;
STICKLINE(AC<=AO,AH,AC,0,0),colorffff00;
STICKLINE(AC<=AO,AO,AL,1,0),color888800;
STICKLINE(AC<=AO,AO,AL,0,0),colorffff00;
STICKLINE(AC<=AO,AC,AO,8,0),COLOR888800;
STICKLINE(AC<=AO,AC,AO,7,0),COLOR999900;
STICKLINE(AC<=AO,AC,AO,6,0),COLORaaaa00;
STICKLINE(AC<=AO,AC,AO,5,0),COLORbbbb00;
STICKLINE(AC<=AO,AC,AO,4,0),COLORcccc00;
STICKLINE(AC<=AO,AC,AO,3,0),COLORdddd00;
STICKLINE(AC<=AO,AC,AO,2,0),COLOReeee00;
STICKLINE(AC<=AO,AC,AO,1,0),COLORffff00;
a:=HHV(MA((L+H+C)/3,3),3);
b:=llv(MA((L+H+C)/3,3),5);
A150:EMA(CLOSE, 150);
drawtext(c>0 and SYSPARAM(2),((h+l)/2)*1.05,' '+'+5%'),Color63806A;
drawtext(c>0 and SYSPARAM(2),((h+l)/2)*1.03,' '+'+3%'),Color63806A;
drawtext(c>0 and SYSPARAM(2),((h+l)/2)*0.95,' '+'-5%'),Color63806A ,linethick2;
drawtext(c>0 and SYSPARAM(2),((h+l)/2)*0.97,' '+'-3%'),Color63806A,linethick2;
DRAWTEXT(c>0 and c>=a and SYSPARAM(2),A*1.015,'多←--'),COLORYELLOW,ALIGN2;
STICKLINE(c>0 and SYSPARAM(2),a,a,20,0),Coloryellow,linethick2;
drawtext(c>0 and SYSPARAM(2),a,' '+NUMTOSTR(a , 3)),colorYELLOW,ALIGN1;
STICKLINE(c>0 and SYSPARAM(2),b,b,20,0),Colorred,linethick2;
drawtext(c>0 and SYSPARAM(2),b,' '+NUMTOSTR(b , 3)),Colorred,ALIGN1;
STICKLINE(c>0 and SYSPARAM(2),((h+l)/2),((h+l)/2),4,0),Colorblue,linethick2;
drawtext(c>0 and SYSPARAM(2),(h+l)/2,' '+NUMTOSTR((h+l)/2,3)),colorgreen;
DRAWTEXT(c>0 and ref(c,1)<ref(a,1) and c>=a AND SYSPARAM(2),A*0.995,'进←--'),COLORYELLOW,ALIGN2;
DRAWTEXT(c>0 and ref(c,1)>ref(a,1) and c<a AND SYSPARAM(2),A*1.01,'↓减--'),COLORYELLOW,ALIGN2;
DRAWTEXT(c>0 and ref(c,1)>ref(b,1) and c<b AND SYSPARAM(2),A*0.995,'↓逃--'),COLORgreen,ALIGN2;
个股MSD:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3);
大盘MSD:=EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV(INDEXL,34)),3);
Q1:=个股MSD<=20 AND 大盘MSD<=20;
Q2:=个股MSD>=20 AND 大盘MSD<=20 AND RANGE(个股MSD,20,50) AND 个股MSD> REF(个股MSD,2);
Q3:=RANGE(个股MSD,50,80) AND RANGE(大盘MSD,20,50) AND 个股MSD>=REF(个股MSD,1) AND 大盘MSD>REF(大盘MSD,1);
Q5:=RANGE(大盘MSD,80,100) AND cross(个股MSD,50) AND 个股MSD<80 AND 个股MSD>=REF(个股MSD,2);
Q6:=大盘MSD<20 AND cross(个股MSD,50) ;
Q7:=RANGE(大盘MSD,50,20 ) AND 个股MSD<=20 AND 个股MSD<REF(个股MSD,2);
Q8:=大盘MSD<ref(大盘MSD,2) AND 个股MSD<REF(个股MSD,2) AND 大盘MSD<80 AND 个股MSD<80 AND 大盘MSD>50 AND 个股MSD>50;
Q9:=大盘MSD<ref(大盘MSD,2) AND 个股MSD<REF(个股MSD,2) AND 大盘MSD<50 AND 个股MSD<50 AND 大盘MSD>20 AND 个股MSD>20;
Q10:=大盘MSD< ref(大盘MSD,2) AND RANGE(个股MSD,20,50) AND RANGE(大盘MSD,20,50) AND 个股MSD>REF(个股MSD,1)AND CROSS(个股MSD,大盘MSD);
Q11:=RANGE(个股MSD,80,100) AND RANGE(大盘MSD,80,100) AND 大盘MSD<=ref(大盘MSD,2) AND 个股MSD<=REF(个股MSD,1);
Q12:=RANGE(个股MSD,50,80) AND RANGE(大盘MSD,50,80) AND 大盘MSD<=ref(大盘MSD,2) AND 个股MSD>=REF(个股MSD,1) AND CROSS(个股MSD,大盘MSD);
Q13:=RANGE(个股MSD,80,100) AND RANGE(大盘MSD,80,100) AND 大盘MSD>=ref(大盘MSD,1) AND 个股MSD>=REF(个股MSD,1);
Q14:=RANGE(个股MSD,50,80) AND RANGE(大盘MSD,50,80) AND 大盘MSD>=ref(大盘MSD,1) AND 个股MSD>=REF(个股MSD,1);
Q15:=RANGE(个股MSD,50,80) AND RANGE(大盘MSD,80,100) AND 个股MSD>=REF(个股MSD,1);
Q16:=RANGE(个股MSD,80,100) AND RANGE(大盘MSD,50,80) AND 个股MSD>=REF(个股MSD,1) AND 大盘MSD<=ref(大盘MSD,1);
Q17:=RANGE(个股MSD,80,100) AND RANGE(大盘MSD,50,80) AND 个股MSD<=REF(个股MSD,1) AND 大盘MSD<=ref(大盘MSD,1);
Q18:=RANGE(个股MSD,20,50) AND RANGE(大盘MSD,0,20) AND 个股MSD<=REF(个股MSD,1)AND 大盘MSD<=ref(大盘MSD,1);
Q19:=RANGE(个股MSD,20,50) AND RANGE(大盘MSD,0,20) AND 个股MSD<=REF(个股MSD,1)AND 大盘MSD<=ref(大盘MSD,1) AND ref(大盘MSD,1)>20 AND ref(大盘MSD,2)>20 AND ref(大盘MSD,3)<20;
Q20:=RANGE(个股MSD,0,20) AND RANGE(大盘MSD,20,50) AND 大盘MSD>=ref(大盘MSD,1);
Q22:=RANGE(个股MSD,50,80) AND RANGE(大盘MSD,20,50) AND 个股MSD>ref(个股MSD,1) AND ref(个股MSD,1)<ref(个股MSD,2) ;
DRAWTEXT(C>0 and BARPOS=SYSPARAM(2),K2*1.04,' 【个股大盘对比分析】'),COLORYELLOW,ALIGN2;
//DRAWTEXTEX(SZ1[SYSPARAM(1)],0,320,25,'调整结束短线介入'),COLORRED;
DRAWTEXTEX(Q1[SYSPARAM(1)],0,320,25,'指数与个股的MSD同时处于相对低位区,表明个股与大盘同步下跌,表明大盘与个股处于历史低位,密切关注可能的向上突破。'),COLORFF00FF,ALIGN2;
DRAWTEXTEX(Q2[SYSPARAM(1)],0,320,25,'指数MSD处于低位,个股MSD脱离低位区并向上突破,表明有庄先行介入,择机买入;'),colorred,ALIGN2;
DRAWTEXTEX(Q3[SYSPARAM(1)],0,320,25,'大盘反弹,个股已经突破分水岭,进入强势;'),colorred,ALIGN2;
DRAWTEXTEX(Q5[SYSPARAM(1)],0,320,25,'后来者居上,个股主升浪开始,买入;'),coloryellow,ALIGN2;
DRAWTEXTEX(Q6[SYSPARAM(1)],0,320,25,'个股逆市上涨,突破分水岭,择机介入,机者成交量,均线和K线的配合;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q7[SYSPARAM(1)],0,320,25,'个股逆市下跌,关注对于20试庄线的突破;'),colorred,ALIGN2;
DRAWTEXTEX(Q8[SYSPARAM(1)],0,320,25,'个股随同大盘顺势下跌,个股行情结束,下跌刚刚开始.;'),coloryellow,ALIGN2;
DRAWTEXTEX(Q9[SYSPARAM(1)],0,320,25,'个股顺势继续下跌,个股行情仍没有见底迹象;'),coloryellow,ALIGN2;
DRAWTEXTEX(Q10[SYSPARAM(1)],0,320,25,'大盘下跌而个股上涨选择买入时机;'),coloryellow,ALIGN2;
DRAWTEXTEX(Q11[SYSPARAM(1)],0,320,25,'大盘与个股皆处强势拉升的未期,有可能转势,择机卖出;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q12[SYSPARAM(1)],0,320,25,'大盘从高位下跌,而个股逆市上涨,有拉高出货的嫌疑,仔细分析,择机出局;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q13[SYSPARAM(1)],0,320,25,'大盘与个股皆处强势拉升中期;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q14[SYSPARAM(1)],0,320,25,'大盘与个股皆处强势拉升的初级阶段;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q15[SYSPARAM(1)],0,320,25,'大盘处于超强势,个股拉升渐渐进入强势;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q16[SYSPARAM(1)],0,320,25,'大盘处于拉升未期,刚开始下跌,个股反而逆市上涨,寻找介入和出货点;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q17[SYSPARAM(1)],0,320,25,'大盘处于拉升未期,刚开始下跌,个股也处拉升的未期,注意见顶;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q18[SYSPARAM(1)],0,320,25,'大盘处于下跌未期,可能是最后一跌,个股可能还有一跌,现在不是介入时机,等待介入时机;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q19[SYSPARAM(1)],0,320,25,'大盘刚突破底部又开始下跌,寻找介入时机;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q20[SYSPARAM(1)],0,320,25,'大盘刚突破底部,个股仍处于底部,寻找介入时机;'),colorgreen,ALIGN2;
DRAWTEXTEX(Q22[SYSPARAM(1)],0,320,25,'个股洗盘结束,再次起动,有可能是领涨股龙头;'),colorgreen,ALIGN2;
DRAWTEXT(C>0 and BARPOS=SYSPARAM(2),K1,'* * * 炒着玩 * * *'),COLORffcccc,ALIGN0;

 

 

 


CZW-G

 


DRAWBKBMP(CLOSE>0,'a008');
{p1:3,0,30;p2:6,1,300;p3:18,1,300;p4:250,0,300}Var1:=(C+L+H)/3;
Var2:=eMA(Var1,6);
Var3:=eMA(Var2,5);
Var4:=eMA(Var3,12);
Var5:=eMA(Var4,5);
生命线:eMA(Var3,30),COLORRED,POINTDOT;
DRAWICON(C>=生命线,生命线,10);
DRAWICON(C<生命线,生命线,11);
a:=HHV(MA((L+H+C)/3,3),3);
b:=llv(MA((L+H+C)/3,3),10);
STICKLINE(BARSCOUNT(C)=SYSPARAM(1),a,a,20,0),Coloryellow,linethick3,shift1;
DRAWNUMBER(BARSCOUNT(C)=SYSPARAM(1),a,a,3),shift3,colorYELLOW;
STICKLINE(BARSCOUNT(C)=SYSPARAM(1),b,b,20,0),ColorDB3FDD,linethick3,shift1;
DRAWNUMBER(BARSCOUNT(C)=SYSPARAM(1),b,b,3),shift3,ColorDB3FDD;DRAWTEXT(sysparam(2)=BARPOS,c,' '+BLKNAME),COLORccffcc,ALIGN4;//板块a1:=cost(95);
a2:=cost(5);
ly:=(a1-a2)*100/(a1+a2);
drawicon(ly>ref(ly,1), l*0.98,8)ALIGN5;N:=p1;{原码 N:=3;}
A1:=REF(H,N)=HHV(H,2*N+1); B1:=FILTER(A1,N); C1:=BACKSET(B1,N+1); D1:=FILTER(C1,N);{高点}
A2:=REF(L,N)=LLV(L,2*N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); D2:=FILTER(C2,N);{低点}
E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2; E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1:=(D2 AND NOT(D1 AND E1<E2)); H2:=D1 AND NOT(D2 AND E1>=E2);
X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1),LINETHICK0;{过滤后低点}
L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1),LINETHICK0;{过滤后高点}///HD:="jgb.HD"(N);LD:="jgb.LD"(N);
R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1); S1:=R1>REF(R1,1); {前一高}
T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1); U1:=T1>REF(T1,1); {前一低}
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2); S2:=R2>REF(R2,1); {前二高}
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2); U2:=T2>REF(T2,1); {前二低}
T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2); U3:=T3>REF(T3,1); {前三低}
T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2); U4:=T4>REF(T4,1); {前四低}
R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2); S3:=R3>REF(R3,1); {前三高}
R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2); S4:=R4>REF(R4,1); {前四高}
压力1:DRAWLINE(S2,H,S1,H,1),Color80FFFF,linethick2;
支撑1:DRAWLINE(U2,L,U1,L,1),POINTDOT,Color00FFFF;
压力2:DRAWLINE(S3,H,S2,H,1),ColorFF8000;
支撑2:DRAWLINE(U3,L,U2,L,1),POINTDOT,ColorFF8000;
压力3:DRAWLINE(S4,H,S3,H,1),Color0000FF;
支撑3:DRAWLINE(U4,L,U3,L,1)POINTDOT,Color0000FF;
DRAWICON(S2,H*1.01,10); DRAWICON(S3,H*1.01,10);
DRAWNUMBER(S2,H*1.02,H,2),COLORMAGENTA;
DRAWNUMBER(S1,H*1.02,H,2),COLORMAGENTA;
DRAWNUMBER(S3,H*1.02,H,2),COLORMAGENTA;
DRAWICON(U1,L*0.99,11); DRAWICON(U2,L*0.99,11);
DRAWICON(U3,L*0.99,11);DRAWICON(U4,L*0.99,11);
DRAWNUMBER(U1,L*0.98,L,2),COLORCYAN;
DRAWNUMBER(U2,L*0.98,L,2),COLORCYAN;
DRAWNUMBER(U3,L*0.98,L,2),COLORCYAN;
DRAWNUMBER(U4,L*0.98,L,2),COLORCYAN;
STICKLINE(open>=close ,close ,open,0,0 ),COLOR00FF00;
STICKLINE(open>=close ,close ,open,8,0 ),COLOR008800;
STICKLINE(open>=close ,close ,open,7,0 ),COLOR009900;
STICKLINE(open>=close ,close ,open,6,0 ),COLOR00AA00;
STICKLINE(open>=close ,close ,open,5,0 ),COLOR00BB00;
STICKLINE(open>=close ,close ,open,4,0 ),COLOR00CC00;
STICKLINE(open>=close ,close ,open,3,0 ),COLOR00DD00;
STICKLINE(open>=close ,close ,open,2,0 ),COLOR00EE00;
STICKLINE(open>=close ,close ,open,1,0 ),COLOR00FF00;STICKLINE(close>open,close,open,0,0) ,COLORFFBBFF;
STICKLINE(close>open,close,open,8,0) ,COLORFF00FF;
STICKLINE(close>open,close,open,7,0) ,COLORFF22FF;
STICKLINE(close>open,close,open,6,0) ,COLORFF44FF;
STICKLINE(close>open,close,open,5,0) ,COLORFF66FF;
STICKLINE(close>open,close,open,4,0) ,COLORFF88FF;
STICKLINE(close>open,close,open,3,0) ,COLORFF99FF;
STICKLINE(close>open,close,open,2,0) ,COLORFFAAFF;
STICKLINE(close>open,close,open,1,0) ,COLORFFBBFF;EXPLAIN(c>0 ,'〓 K 线形态分析 〓 '),ColorFFFFFF;早晨之星:=REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1) < REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 AND
CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2);
黄昏之星:=REF(CLOSE,2)/REF(OPEN,2) > 1.03 AND REF(OPEN,1) > REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.02 AND
CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,2);
长十字:=CLOSE=OPEN AND HIGH/LOW >1.03;
垂死十字:=CLOSE=OPEN AND CLOSE=LOW AND CLOSE<>HIGH;
早晨十字星:=REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1) < REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND
CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2);
黄昏十字星:=REF(CLOSE,2)/REF(OPEN,2) > 1.05 AND REF(OPEN,1) > REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND
CLOSE/OPEN<0.95 AND CLOSE<REF(CLOSE,2);
射击之星:=MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE > MA(CLOSE,5);
倒转锤头:=MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE < MA(CLOSE,5);
锤头:=HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW > 3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE < MA(CLOSE,5);
吊颈:=HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW > 3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE>MA(CLOSE,5);
穿头破脚:=(REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.96 AND CLOSE<REF(OPEN,1) AND OPEN>REF(CLOSE,1))
OR (REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.04 AND CLOSE>REF(OPEN,1) AND OPEN<REF(CLOSE,1));
乌云盖顶:=REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.97 AND OPEN>REF(CLOSE,1) AND CLOSE<REF(CLOSE,1);
曙光初现:=REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.03 AND OPEN<REF(CLOSE,1) AND CLOSE>REF(CLOSE,1);
身怀六甲:=ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04 AND ABS(CLOSE-OPEN)/CLOSE<0.005 AND
MAX(CLOSE,OPEN) < MAX(REF(CLOSE,1),REF(OPEN,1)) AND MIN(CLOSE,OPEN) > MIN(REF(CLOSE,1),REF(OPEN,1));
十字胎:=ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04 AND CLOSE=OPEN AND
CLOSE < MAX(REF(CLOSE,1),REF(OPEN,1)) AND CLOSE > MIN(REF(CLOSE,1),REF(OPEN,1));
平顶:=ABS(HIGH-REF(HIGH,1))/HIGH<0.001;
平底:=(ABS(LOW-REF(LOW,1))/LOW<0.001 and abs(ref(low,1)-ref(low,2))/ref(low,1)<=0.001);
大阳烛:=CLOSE/OPEN>1.05 AND HIGH/LOW < CLOSE/OPEN+0.018;
红三兵:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN
AND REF(CLOSE,1)>REF(CLOSE,2) AND CLOSE>REF(CLOSE,1);
双飞乌鸦:=REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPEN AND CLOSE/OPEN<0.98;
孕育线:=REF(CLOSE,2)>REF(OPEN,2) AND (REF(CLOSE,2)-REF(OPEN,2))/REF(OPEN,2)>=2/100 AND REF(OPEN,1)>=REF(CLOSE,1) AND
(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<=2/100 AND REF(OPEN,1)<=REF(CLOSE,2) AND REF(CLOSE,1)>=REF(OPEN,2) AND C>=OPEN AND
(CLOSE-OPEN)/OPEN>=2/100 AND CLOSE>=REF(OPEN,1) AND OPEN<=REF(CLOSE,1) AND (MAX(CLOSE,REF(C,2))-MIN(CLOSE,REF(CLOSE,2)))/MIN(CLOSE,REF(CLOSE,2))<=1/100;
多方炮:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE>OPEN;
出水芙蓉:=(OPEN<EMA(C,20) OR OPEN<EMA(C,40) OR OPEN<EMA(C,60)) AND (C>MAX(EMA(C,20),MAX(EMA(C,40),EMA(C,60))))
AND (V/MA(V,30)>1.2 AND C/REF(C,1)>1.049);
上升三部曲:=REF(CLOSE,4)/REF(OPEN,4)>1.03 AND REF(CLOSE,3)<REF(OPEN,3) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND
REF(LOW,4)<REF(LOW,3) AND REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND
REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN>1.03 AND CLOSE>REF(CLOSE,4);
下跌三部曲:= REF(CLOSE,4)/REF(OPEN,4)<0.97 AND REF(CLOSE,3)>REF(OPEN,3) AND REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND REF(LOW,4)<REF(LOW,3) AND
REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN<0.97 AND
CLOSE<REF(CLOSE,4);
跳空缺口:=HIGH<REF(LOW,1) OR LOW>REF(HIGH,1);
三只乌鸦:=REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPEN AND REF(CLOSE,1)<REF(CLOSE,2) AND CLOSE<REF(CLOSE,1);
光脚阴线:=LOW=CLOSE AND HIGH<>LOW;
光头阳线:=HIGH=CLOSE AND HIGH<>LOW;
分离:=OPEN=REF(OPEN,1) AND (CLOSE-OPEN)*(REF(CLOSE,1)-REF(OPEN,1))<0;
长下影:=(MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.667;
长上影:=(HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)>0.667;
十字星:=CLOSE=OPEN AND HIGH<>LOW;
大阴烛:=OPEN/CLOSE > 1.05 AND HIGH/LOW < OPEN/CLOSE+0.018;
好友反攻:=(REF(CLOSE,1)<REF(OPEN,1) AND CLOSE>OPEN AND ABS(CLOSE-REF(CLOSE,1))/CLOSE<0.002)
OR (REF(CLOSE,1)>REF(OPEN,1) AND CLOSE<OPEN AND ABS(CLOSE-REF(CLOSE,1))/CLOSE<0.002);
倾盆大雨:=REF(C,1)/REF(O,1)>=1.03 AND O<REF(C,1) AND O>REF(O,1) AND C<REF(O,1);EXPLAIN(倾盆大雨,'倾盆大雨见顶信号;'),COLORCYAN;
EXPLAIN(大阴烛,'大阴烛后市向淡,发生逆转;'),COLORCYAN;
EXPLAIN(好友反攻,'好友反攻底部反转;'),COLORRED;
EXPLAIN(跳空缺口,'跳空缺口注意向上还是向下跳空;'),COLORWHITE;
EXPLAIN(光脚阴线,'光脚阴线下跌信号;'),COLORCYAN;
EXPLAIN(光头阳线,'光头阳线后市看涨;'),COLORRED;
EXPLAIN(三只乌鸦,'三只乌鸦可能见顶回落;'),COLORCYAN;
EXPLAIN(分离,'分离注意看涨分离和看跌分离;'),COLORWHITE;
EXPLAIN(长下影,'长下影持续下跌后出现,有可能止跌回升;在升势末期出现,须多加留意;'),COLORRED;
EXPLAIN(长上影,'长上影表明行情上档压力沉重,升势受阻;'),COLORCYAN;
EXPLAIN(下跌三部曲,'下跌三部曲下跌信号;'),COLORRED;
EXPLAIN(上升三部曲,'上升三部曲上涨信号;'),COLORCYAN;
EXPLAIN(早晨之星,'早晨之星见底回升;'),COLORRED;
EXPLAIN(黄昏之星,'黄昏之星见顶回落;'),COLORCYAN;
EXPLAIN(十字星,'十字星有转向意味,注意股价位置在顶部还是底部;'),COLORWHITE;
EXPLAIN(长十字,'长十字注意在顶部还是底部;'),COLORWHITE;
EXPLAIN(垂死十字,'垂死十字下跌信号;'),COLORCYAN;
EXPLAIN(早晨十字星,'早晨十字星上涨信号,见底回升;'),COLORRED;
EXPLAIN(黄昏十字星,'黄昏十字星下跌信号,见顶回落;'),COLORCYAN;
EXPLAIN(射击之星,'射击之星可能见顶回落,可靠性低;'),COLORCYAN;
EXPLAIN(倒转锤头,'倒转锤头可能见底回升;'),COLORRED;
EXPLAIN(锤头,'锤头可能见底回升,如有量配合,信号强烈;'),COLORRED;
EXPLAIN(吊颈,'吊颈上升行情中见顶回落,顶部出现,见顶信号;'),COLORCYAN;
EXPLAIN(平顶,'平顶温和的反转;'),COLORCYAN;
EXPLAIN(穿头破脚,'穿头破脚顶部出现,见顶回落信号;'),COLORCYAN;
EXPLAIN(乌云盖顶,'乌云盖顶见顶回落信号;'),COLORCYAN;
EXPLAIN(曙光初现,'曙光初现后市见底回升;'),COLORRED;
EXPLAIN(身怀六甲,'身怀六甲出现在底部,是见底回升信号;出现在顶部,是见顶回落信号;'),COLORRED;
EXPLAIN(十字胎,'十字胎'),COLORRED;
EXPLAIN(平底,'平底温和的反转;'),COLORRED;
EXPLAIN(大阳烛,'大阳烛看涨;'),COLORRED;
EXPLAIN(红三兵,'红三兵每日收盘价上移,表示可能见底回升;'),COLORRED;
EXPLAIN(双飞乌鸦,'双飞乌鸦行情将见顶回落;'),COLORCYAN;
EXPLAIN(孕育线,'孕育线注意股价位置;'),COLORWHITE;
EXPLAIN(多方炮,'多方炮在底部出现有上涨可能,在中间出现有可能是上涨中继,顶部出现是复合见顶信号;'),COLORRED;
EXPLAIN(出水芙蓉,'出水芙蓉见底回升;'),COLORRED;CZW-H
DRAWBKBMP(CLOSE>0,'a008');
Var2:=EMA(SLOPE(EMA(CLOSE,20),10)*34+CLOSE,30);
Var3:=EMA(Var2,3);
Var4:=EMA(Var3,3);
Var5:=EMA(Var4,3);
Var6:=EMA(Var5,3);
Va7:=EMA(Var6,3);
VAR7:=EMA(Va7,3);
VA8:=EMA(VAR7,3);
Var8:=EMA(VA8,3);
Var9:=EMA(Var8,3);
VarA:=BARSLAST(CROSS(CLOSE,Var9));
VarB:=BARSLAST(CROSS(Var9,CLOSE));
卷帘操作: STICKLINE(CLOSE>Var9 AND CLOSE>REF(CLOSE,VarA),REF(CLOSE,VarA),LOW*1,00,1),Color0000B0,linethick0;
强: STICKLINE(CLOSE<Var9 AND CLOSE<REF(CLOSE,VarB),REF(CLOSE,VarB),HIGH*1.00,0,1),Color00B000,linethick0;
势: STICKLINE(CLOSE>Var9 AND CLOSE<REF(CLOSE,VarA),REF(CLOSE,VarA),LOW*1.02,0,1),linethick0;
冷: STICKLINE(CLOSE>Var9 AND CLOSE<REF(CLOSE,VarA),REF(CLOSE,VarA),REF(CLOSE,VarA),6,1),COLORGREEN,linethick0;
沉: STICKLINE(CLOSE<Var9,REF(CLOSE,VarB),REF(CLOSE,VarB),16,0),ColorB3B3B3,linethick2;
Var10:STICKLINE(CLOSE>Var9,REF(CLOSE,VarA),REF(CLOSE,VarA),16,0),COLORBLUE,linethick2;
x5:HHV((REF(CLOSE,1)+REF(CLOSE,2)+REF(CLOSE,3)+REF(CLOSE,4))/4.00,5),COLORGREEN;
x10:HHV((REF(CLOSE,2)+REF(CLOSE,3)+REF(CLOSE,4)+REF(CLOSE,5))/4.00,10),COLORyellow;
x20:HHV((REF(CLOSE,3)+REF(CLOSE,4)+REF(CLOSE,5)+REF(CLOSE,6))/4,20),COLORMAGENTA;
AC:=C;
AH:=H;
AL:=L;
AO:=O;
STICKLINE(AC>=AO,AH,AC,1,0),color225588;
STICKLINE(AC>=AO,AH,AC,0,0),color66ccff;
STICKLINE(AC>=AO,AO,AL,1,0),color225588;
STICKLINE(AC>=AO,AO,AL,0,0),color66ccff;STICKLINE(AC>AO,AC,AO,8,0),COLOR225588;
STICKLINE(AC>AO,AC,AO,7,0),COLOR226699;
STICKLINE(AC>AO,AC,AO,6,0),COLOR3377aa;
STICKLINE(AC>AO,AC,AO,5,0),COLOR3388bb;
STICKLINE(AC>AO,AC,AO,4,0),COLOR4499cc;
STICKLINE(AC>AO,AC,AO,3,0),COLOR44aadd;
STICKLINE(AC>AO,AC,AO,2,0),COLOR55bbee;
STICKLINE(AC>AO,AC,AO,1,0),COLOR66ccff;STICKLINE(AC<=AO,AH,AC,1,0),color888800;
STICKLINE(AC<=AO,AH,AC,0,0),colorffff00;
STICKLINE(AC<=AO,AO,AL,1,0),color888800;
STICKLINE(AC<=AO,AO,AL,0,0),colorffff00;STICKLINE(AC<=AO,AC,AO,8,0),COLOR888800;
STICKLINE(AC<=AO,AC,AO,7,0),COLOR999900;
STICKLINE(AC<=AO,AC,AO,6,0),COLORaaaa00;
STICKLINE(AC<=AO,AC,AO,5,0),COLORbbbb00;
STICKLINE(AC<=AO,AC,AO,4,0),COLORcccc00;
STICKLINE(AC<=AO,AC,AO,3,0),COLORdddd00;
STICKLINE(AC<=AO,AC,AO,2,0),COLOReeee00;
STICKLINE(AC<=AO,AC,AO,1,0),COLORffff00;DRAWTEXT(sysparam(2)=BARPOS,c,' '+BLKNAME),COLORccffcc,ALIGN4;//板块次买:=O+(c-O)/2 ,LINETHICK2,POINTDOT,SHIFT1;
次卖:=C+(O-C)/2 ,COLORRED,POINTDOT,LINETHICK2,SHIFT1;
上涨空间预测:=C+((H-L)/2)*2 ,POINTDOT,LINETHICK2,SHIFT1;;
下跌空间预测:=c-((h-l)/2)*2 ,POINTDOT,LINETHICK2,SHIFT1;;
PARTLINE(次买 AND ISLASTBAR=1,次买),SHIFT1,pointdot,colorDDDDDD;
PARTLINE(上涨空间预测 AND ISLASTBAR=1,上涨空间预测),SHIFT1,pointdot,ColorDDDDDD;
PARTLINE(下跌空间预测 AND ISLASTBAR=1,下跌空间预测),SHIFT1,pointdot,colorDDDDDD;
次1:=C*2-ma(ref(C,3),3){ref(C,3)};
次2:=ref(C,1)*2-ma(ref(C,4),4){ref(C,4)};
次3:=ref(C,2)*2-ma(ref(C,5),5){ref(C,5)};
PARTLINE(C*2-ma(ref(C,3),3)AND ISLASTBAR=1,次1),shift3,coloryellow,linethick1,pointdot;
PARTLINE(ref(C,1)*2-ma(ref(C,4),4)AND ISLASTBAR=1,次2),shift2,coloryellow,linethick1,pointdot;
PARTLINE(ref(C,2)*2-ma(ref(C,5),5)AND ISLASTBAR=1,次3),shift1,coloryellow,linethick1,pointdot;
a1:=cost(95);
a2:=cost(5);
ly:=(a1-a2)*100/(a1+a2);
drawicon(ly>ref(ly,1), l*0.98,8)ALIGN5;VAR3:=IF((CLOSE>REF(CLOSE,1)),88,0);
VAR4:=IF(((CLOSE)/(REF(CLOSE,1))>1.03) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3>0),91,0);
DRAWTEXT((VAR4>90),(LOW)*(0.94999998),'加仓'),Color00FFFF;
DRAWTEXT((VAR4>90),(LOW)*(0.99000001),''),Color00FFFF;Var1:=(HIGH+LOW+OPEN+2*CLOSE)/5;
Var2:=REF(Var1,1);
Var3:=SMA(MAX(Var1-Var2,0),10,1)/SMA(ABS(Var1-Var2),10,1)*100;
HY3:=IF(COUNT(Var3<20,5)>=1 AND COUNT(Var1=LLV(Var1,10),10)>=1 AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0);
DRAWTEXT(hy3,LOW,'▲买入'),coloryellow;Varr1:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
DRAWICON(CROSS(82,Varr1),HIGH,2);
DRAWTEXT(CROSS(82,Varr1),HIGH,'▲风险↓'),coloryellow;EL1:=EMA(LOW,6);
EL2:=EMA(EMA(LOW,34)*1,02)-0.16;
DRAWICON(CROSS(EL1,EL2),EL1,10);V1:=REF(C,1);
V2:=SMA(MAX(C-V1,0),6,1)/SMA(ABS(C-V1),6,1)*100;
DRAWICON(IF(CROSS(81,V2),1,0),h*1.01,11);{程序化交易 www.cxh99.com }
{程序化交易 www.cxh99.com }

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 511411198  有需要帮忙请点击这里留言!!!或微信:cxhjy888 进行 有偿 编写!不贵!点击查看价格!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容