通达信智能三角主图指标(源码)

2013-11-18 09:37:00来源:本站整理浏览:780

A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1);
D1:=FILTER(C1,3);{高点}
A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1);
D2:=FILTER(C2,3);{低点}
E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2; E2:=(HIGH+LOW)/2;{高
低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(CLOSE)=0;
L1:=(D2 AND NOT(D1 AND E1=E2));
X1:=REF(BARSLAST(H1),1)+1;
F1:=IF(LLVBARS(IF(L1,LOW,10000),X1)=0,0,BACKSET(H1 AND COUNT(L1,X1)
>0,LLVBARS(IF(L1,LOW,10000),X1)));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{过滤后低点}
L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=0;
X2:=REF(BARSLAST(L2),1)+1;
F2:=IF(HHVBARS(IF(H1,HIGH,0),X2)=0,0,BACKSET(L2 AND COUNT(H1,X2)
>=1,HHVBARS(IF(H1,HIGH,0),X2)));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{过滤后高点}
UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
{以下语句为三角形部分}
底:=REF(L,BARSLAST(VV));
頂:=REF(H,BARSLAST(VV2));
{下迭三角形:藍色三角形畫完介入}
DRAWLINE(VV2,H,VV,L,0),COLORFF6633,LINETHICK3;
DRAWLINE(VV2,H,VV,頂,0),COLORFF6633,LINETHICK3;
STICKLINE(VV,頂,底,0.5,0),COLORFF6633;
{上漄三角形:糡色三角形畫完出局}
DRAWLINE(VV,L,VV2,H,0),COLORRED,LINETHICK3;{斜}
DRAWLINE(VV,L,VV2,底,0),COLORRED,LINETHICK3;{?};
STICKLINE(VV2,頂,底,0.5,0),COLORRED;
花:=EMA(SLOPE(1,1)+C,3),COLORRED;
女:=EMA(SLOPE(1,1)+C,7),COLORBLUE;
DRAWTEXT(COUNT (花<女,5)=4 AND 花>=女,C*0.95,'B'), COLORRED;
DRAWTEXT(COUNT (花>=女,5)=4 AND 花<女,C*1.08,'S'), COLORYELLOW;
STICKLINE(花>= 女 ,CLOSE,OPEN,8,0) ,COLOR000077;
STICKLINE(花>= 女 ,CLOSE,OPEN,7,0) ,COLOR000099;
STICKLINE(花>= 女 ,CLOSE,OPEN,6,0) ,COLOR0000BB;
STICKLINE(花>= 女 ,CLOSE,OPEN,5,0) ,COLOR0000CC;
STICKLINE(花>= 女 ,CLOSE,OPEN,4,0) ,COLOR0000DD;
STICKLINE(花>= 女 ,CLOSE,OPEN,3,0) ,COLOR0000EE;
STICKLINE(花>= 女 ,CLOSE,OPEN,2,0) ,COLOR0000FF;
STICKLINE(花>= 女 ,CLOSE,CLOSE/1.006,1,0),COLOR0000FF;
STICKLINE(花>= 女 ,CLOSE,CLOSE/1.005,2,0),,COLOR0000EE;
STICKLINE(花>= 女 ,CLOSE,CLOSE/1.004,3,0),COLOR0000DD;
STICKLINE(花>= 女 ,CLOSE,CLOSE/1.003,4,0),COLOR0000CC;
STICKLINE(花>= 女 ,CLOSE,CLOSE/1.002,5,0),COLOR0000BB;
STICKLINE(花>= 女 ,CLOSE,CLOSE/1.001,6,0),COLOR000099;
STICKLINE(花>= 女 ,OPEN,OPEN*1.006,1,0),COLOR0000FF;
STICKLINE(花>= 女 ,OPEN,OPEN*1.005,2,0),,COLOR0000EE;
STICKLINE(花>= 女 ,OPEN,OPEN*1.004,3,0),COLOR0000DD;
STICKLINE(花>= 女 ,OPEN,OPEN*1.003,4,0),COLOR0000CC;
STICKLINE(花>= 女 ,OPEN,OPEN*1.002,5,0),COLOR0000BB;
STICKLINE(花>= 女 ,OPEN,OPEN*1.001,6,0),COLOR000099;
STICKLINE(花<= 女 ,CLOSE,OPEN/1.006,9,0),COLORFF0000;
STICKLINE(花<= 女 ,CLOSE,OPEN/1.005,8,0),COLORFF0000;
STICKLINE(花<= 女 ,CLOSE,OPEN/1.004,7,0),COLORFF3300;
STICKLINE(花<= 女 ,CLOSE,OPEN/1.003,3,0),COLORFFDD00;
STICKLINE(花<= 女 ,CLOSE,OPEN/1.002,2,0),COLORFFFF00;
EMA13:=EMA(C,20),COLORFF8080;
EMA34:=EMA(C,60),COLORFFFF00;
EMA55:=EMA(C,80),COLORFF00FF;
YZ1:=C/O>1.02 AND H/C>1.02 AND O/L<1.02;
YZ2:=REF(C,1)>REF(O,1) AND O>MA(C,11);
Y:=(MA(C,13)-MA(C,55))/MA(C,13)*100;
YZ:=YZ1 AND YZ2 AND Y>10;
X11:DRAWTEXT(YZ,HIGH+0.2,'减仓'),COLORF00FF0;
GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5) );
GR2:=EMA13>EMA34 AND EMA34>EMA55 AND EMA13>REF(EMA13,1);
GR3:=COUNT("BIAS.BIAS2"(6,13,24)>10 AND H=HHV(H,GR1),GR1);
GR4:=H=HHV(H,GR1);
GR5:="MACD.MACD"(12,26,9)<REF("MACD.MACD"(12,26,9),1);
GR6:=GR2 AND GR3 AND GR4;
GR7:=GR2 AND GR3 AND GR4 AND GR5;
DRAWTEXT(GR6 AND GR7,H+0.13,'保存利润'),COLOR00FF00;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
支撑位:IF(A1X>=0,REF(EMA(C,14),BARSLAST(CROSS(A1X,0))
+1),DRAWNULL),COLORRED,LINETHICK1;
阻力位:IF(A1X<0,REF(EMA(C,14),BARSLAST(CROSS(0,A1X))
+1),DRAWNULL),COLORGREEN,LINETHICK1;
STICKLINE(CROSS(A1X,0),C,O,2,0),COLORYELLOW;
STICKLINE(CROSS(0,A1X),C,O,2,0),COLORGREEN;
DRAWICON(CROSS(花,女) AND CLOSE/REF(CLOSE,1)>1.03,LOW/1.06,25);
花2:=EMA(SLOPE(1,1)+C,3),COLORRED;
女2:=EMA(SLOPE(1,1)+C,7),COLORBLUE;

通达信智能三角主图指标(源码)

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式