软件名称:[B]精妙画线公式(CZW-G 红绿三角 三角形 箱体 K线变色)[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/
软件语言:简体中文
授权方式:免费版
软件大小:15.0 KB
官方主页:Home Page
更新时间:2011-06-13 06:18:04
软件简介:
{CZW-G}
{p1:3,0,30;p2:6,1,300;p3:18,1,300;p4:250,0,300}
input:p1(3),p2(6),p3(18),p4(250);
DRAWGBKLAST(CLOSE>0,'a008');
if DISPSTATUS=2 then aaa:=BARPOS;
if DISPSTATUS=1 then bbb:=BARPOS;
ddd:=aaa-bbb;
ee:=hhv(h,ddd);
TJTS:=BARSTATUS=2;
Var1:=(C+L+H)/3;
Var2:=eMA(Var1,6);
Var3:=eMA(Var2,5);
Var4:=eMA(Var3,12);
Var5:=eMA(Var4,5);
{红绿三角【副图】}
A10304:=REF(HIGH,3)=HHV(HIGH,2*3+1);
B10304:=FILTER(A10304,3);
C10304:=BACKSET(B10304,3+1);
D10304:=FILTER(C10304,3);{高点}
A20304:=REF(LOW,3)=LLV(LOW,2*3+1);
B20304:=FILTER(A20304,3);
C20304:=BACKSET(B20304,3+1);
D20304:=FILTER(C20304,3);{低点}
E10304:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;
E20304:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}
H10304:=(D10304 AND NOT(D20304 AND E10304>=E20304)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
L10304:=(D20304 AND NOT(D10304 AND E10304=E20304));
X10304:=REF(BARSLAST(H10304),1)+1;
F10304:=BACKSET(H10304 AND COUNT(L10304,X10304)>0,LLVBARS(IF(L10304,LOW,10000),X10304));
G10304:=F10304>REF(F10304,1);
I10304:=BACKSET(G10304,2);
LD0304:=I10304>REF(I10304,1);{过滤后低点}
L20304:=LD0304 OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X20304:=REF(BARSLAST(L20304),1)+1;
F20304:=BACKSET(L20304 AND COUNT(H10304,X20304)>0,HHVBARS(IF(H10304,HIGH,0),X20304));
G20304:=F20304>REF(F20304,1);
I20304:=BACKSET(G20304,2);
HD0304:=I20304>REF(I20304,1);{过滤后高点}
UU0304:=BACKSET(BARSTATUS=2,BARSLAST(LD0304)+1);
VV0304:=UU0304>REF(UU0304,1);
UU20304:=BACKSET(BARSTATUS=2,BARSLAST(HD0304)+1);
VV20304:=UU20304>REF(UU20304,1);
{以下语句为三角形部分}
底:REF(L,BARSLAST(VV0304)),COLORred,LINETHICK1;
顶:REF(H,BARSLAST(VV20304)),COLORGreen,LINETHICK1;
{下跌三角形:绿色三角形画完介入}
StickLine(VV0304,顶,底,0,0),COLORGreen,linethick2;
DRAWLINE(VV20304,H,VV0304,L,0),COLORGreen,linethick2;{斜}
DRAWLINE(VV20304,H,VV0304,顶,0),COLORGreen,linethick2;
{上涨三角形:红色三角形画完出局}
StickLine(VV20304 ,顶,底,0,0),COLORred,linethick2;
DRAWLINE(VV0304,L,VV20304,H,0),COLORred,linethick2;{斜}
DRAWLINE(VV0304,L,VV20304,底,0),COLORred,linethick2;
{文字}
NN304:= DISPSTATUS=2;
DRAWTEXT(nn304,底,'底: '+NUMTOSTRN(底,2)+'元 '),ALIGN2,COLORred,LINETHICK1,VALIGN0;
DRAWTEXT(nn304,顶,'顶: '+NUMTOSTRN(顶,2)+'元 '),ALIGN2,COLORGreen,LINETHICK1,VALIGN2;
{箱体}
TY309:=C;
HD309:=FILTER(BACKSET(FILTER(REF(TY309,10)=HHV(TY309,2*10+1),10),10+1),10);
LD309:=FILTER(BACKSET(FILTER(REF(TY309,10)=LLV(TY309,2*10+1),10),10+1),10);
A309:=REF(C,BARSLAST(HD309));
B309:=REF(C,BARSLAST(LD309));
T1309:=BARSLAST(HD309)<BARSLAST(LD309) AND NOT(HD309) ;
T2309:=BARSLAST(HD309)>BARSLAST(LD309) AND NOT(LD309);
波浪顶:IF(T1309,A309,A309),COLORCYAN,POINTDOT,LINETHICK2;
波浪底:IF(T2309,B309,B309),COLORMAGENTA,POINTDOT,LINETHICK2;
a:=HHV(MA((L+H+C)/3,3),3);
b:=llv(MA((L+H+C)/3,3),10);
STICKLINE(DISPSTATUS=2,a,a,20,0),Coloryellow,linethick1;{小箱体--上沿}
DRAWTEXT(DISPSTATUS=2 ,a,NUMTOSTRN(a,3)),colorYELLOW;
STICKLINE(DISPSTATUS=2,b,b,20,0),COLORWhite,linethick1;{小箱体--下沿}
DRAWTEXT(DISPSTATUS=2,b,NUMTOSTRN(b,3)),COLORWhite;
k1:=llv(l,barslast(DISPSTATUS=1)+1);
aa1:=cost(95);
aa2:=cost(5);
ly:=(aa1-aa2)*100/(aa1+aa2);
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 DISPSTATUS=2 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);{过滤后低点}
L2:=LD OR DISPSTATUS=2 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);{过滤后高点}
R1:=BACKSET(DISPSTATUS=2,BARSLAST(HD)+1); S1:=R1>REF(R1,1); {前一高}
T1:=BACKSET(DISPSTATUS=2,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); {前四高}
DRAWLINE(S2,H,S1,H,1),Color80FFFF; {★压力1:}
DRAWLINE(U2,L,U1,L,1),POINTDOT,Color00FFFF,linethick1;{★支撑1:}
DRAWLINE(S3,H,S2,H,1),ColorFF8000; {★压力2:}
DRAWLINE(U3,L,U2,L,1),POINTDOT,ColorFF8000;{★支撑2:}
DRAWLINE(S4,H,S3,H,1),Color0000FF;{★压力3:}
DRAWLINE(U4,L,U3,L,1),POINTDOT,Color0000FF;{★支撑3:};
DRAWICON(S2,H*1.02,9);{高点红电池}
DRAWICON(S3,H*1.02,9);
DRAWTEXT(S2,H*1.035,NUMTOSTRN(H,2)),COLORMAGENTA,linethick2;{高价点位}
DRAWTEXT(S1,H*1.035,NUMTOSTRN(H,2)),COLORMAGENTA,linethick2;{高价点位}
DRAWTEXT(S3,H*1.035,NUMTOSTRN(H,2)),COLORMAGENTA,linethick2;{高价点位}
DRAWICON(U1,L*0.98,10); {低点小红旗}
DRAWICON(U2,L*0.98,10);{低点小红旗}
DRAWICON(U3,L*0.98,10);{低点小红旗}
DRAWICON(U4,L*0.98,10);{低点小红旗}
DRAWTEXT(U1,L*0.96,NUMTOSTRN(L,2)),COLORCYAN,linethick2;{低价点位}
DRAWTEXT(U2,L*0.96,NUMTOSTRN(L,2)),COLORCYAN,linethick2;{低价点位}
DRAWTEXT(U3,L*0.96,NUMTOSTRN(L,2)),COLORCYAN,linethick2;{低价点位}
DRAWTEXT(U4,L*0.96,NUMTOSTRN(L,2)),COLORCYAN,linethick2;{低价点位}
{K线变色}
{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;}
DRAWGBKLAST(CLOSE>0,STRIP(RGB(95,95,95),RGB(0,0,0),0));
[url=http://www.70822.com/soft/sort013/sort03/down-34886.html]精妙画线公式(CZW-G 红绿三角 三角形 箱体 K线变色)[/url]