1. 首页
  2. 股票公式

通达信黄金K线主图指标公式

通达信黄金K线主图指标公式

N:=72;
M:=1357;
P1:=151;
P2:=14;
{回调预测-M=200-1000-738}
高:=REF(HHV(H,N),3);
顶:REFDATE(高,DATE),COLORWHITE;
Z1:REFDATE(高/1.0809,DATE),POINTDOT,LINETHICK1,COLORYELLOW;
Z2:REFDATE(高/1.1618,DATE),POINTDOT,LINETHICK1,COLORYELLOW;
Z3:REFDATE(高/1.2558,DATE),POINTDOT,LINETHICK1,COLORMAGENTA;
Z4:REFDATE(高/1.4589,DATE),POINTDOT,LINETHICK1,COLORYELLOW;
Z5:REFDATE(高/1.5770,DATE),POINTDOT,LINETHICK1,COLORRED;
{Z6:REFDATE(高/1.8322,DATE),POINTDOT,LINETHICK1,COLORYELLOW;
Z7:REFDATE(高/1.9804,DATE),POINTDOT,LINETHICK1,COLORGREEN;
Z8:REFDATE(高/2.3008,DATE),POINTDOT,LINETHICK1,COLORYELLOW;
Z9:REFDATE(高/2.4870,DATE),POINTDOT,LINETHICK1,COLORWHITE;}
Z:REFDATE(高/(M/1000),DATE),LINETHICK4,COLORYELLOW;
支:REFDATE(高/(M/1000),DATE),LINETHICK2,COLORRED;
DRAWTEXT(ISLASTBAR,顶,’顶’),COLORWHITE;
DRAWTEXT(ISLASTBAR,Z1,’8.09′),COLORGREEN;
DRAWTEXT(ISLASTBAR,Z2,’16.18′),COLORGREEN;
DRAWTEXT(ISLASTBAR,Z3,’25.58′),COLORGREEN;
DRAWTEXT(ISLASTBAR,Z4,’45.98′),COLORGREEN;
DRAWTEXT(ISLASTBAR,Z5,’57.7′),COLORGREEN;
{DRAWTEXT(ISLASTBAR,Z6,’83.22′),COLORGREEN;
DRAWTEXT(ISLASTBAR,Z7,’98.04′),COLORGREEN;
DRAWTEXT(ISLASTBAR,Z8,’130.08′),COLORGREEN;
DRAWTEXT(ISLASTBAR,Z9,’148.7′),COLORGREEN;}
DRAWKLINE(H,O,L,C);
{龙抬头Ⅲ}
PL5:=ZIG(3,5);
EN1:=ZIG(3,5)>REF(ZIG(3,5),1)ANDREF(ZIG(3,5),1)<=REF(ZIG(3,5),2)ANDREF(ZIG(3,5),2)<=REF(ZIG(3,5),3); EX1:=ZIG(3,5)=REF(ZIG(3,5),2)ANDREF(ZIG(3,5),2)>=REF(ZIG(3,5),3);
PL10:=ZIG(3,10);
EN2:=ZIG(3,10)>REF(ZIG(3,10),1)ANDREF(ZIG(3,10),1)<=REF(ZIG(3,10),2)ANDREF(ZIG(3,10),2)<=REF(ZIG(3,10),3); EX2:=ZIG(3,10)=REF(ZIG(3,10),2)ANDREF(ZIG(3,10),2)>=REF(ZIG(3,10),3);
PL20:=ZIG(3,20);
EN3:=ZIG(3,20)>REF(ZIG(3,20),1)ANDREF(ZIG(3,20),1)<=REF(ZIG(3,20),2)ANDREF(ZIG(3,20),2)<=REF(ZIG(3,20),3); EX3:=ZIG(3,20)=REF(ZIG(3,20),2)ANDREF(ZIG(3,20),2)>=REF(ZIG(3,20),3);
PL40:=ZIG(3,40);
走强1:=BARSLAST(PL5REF(PL5,1));
走强2:=BARSLAST(PL10REF(PL10,1));
走强3:=BARSLAST(PL20REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN3ANDZTJZ10=1,L0.93,’★龙抬头Ⅲ’),COLOR00FFFFLINETHICK2; {自动画线} A1:=REF(H,N)=HHV(H,2N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
D1:=FILTER(C1,N);{高点}
A2:=REF(L,N)=LLV(L,2N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); D2:=FILTER(C2,N);{低点} E1:=(REF(LLV(L,2N),1)+REF(HHV(H,2N),1))/2; E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍} H1:=(D1ANDNOT(D2ANDE1>=E2))ORISLASTBARORBARSCOUNT(C)=1; L1:=(D2ANDNOT(D1ANDE1=E2);X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1ANDCOUNT(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:=LDORISLASTBARORBARSCOUNT(C)=1; X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2ANDCOUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2)); G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1),LINETHICK0;{过滤后高点} 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),COLORMAGENTA,LINETHICK1; ★支撑1:DRAWLINE(U2,L,U1,L,1),COLOR8FBC8F,LINETHICK1; ★压力2:DRAWLINE(S3,H,S2,H,1),COLORFF8000; ★支撑2:DRAWLINE(U3,L,U2,L,1),COLOR99CC32; ★压力3:DRAWLINE(S4,H,S3,H,1),COLOR0000FF; ★支撑3:DRAWLINE(U4,L,U3,L,1),COLOR00FF7F; DRAWICON(S2,H1.01,10);
DRAWICON(S3,H1.01,10); DRAWNUMBER(S2,H1.02,H),COLORCFB53B;
DRAWNUMBER(S1,H1.02,H),COLORCFB53B; DRAWNUMBER(S3,H1.02,H),COLORCFB53B;
DRAWICON(U1,L0.99,11); DRAWICON(U2,L0.99,11);
DRAWICON(U3,L0.99,11); DRAWICON(U4,L0.99,11);
DRAWNUMBER(U1,L0.98,L),COLORCYAN; DRAWNUMBER(U2,L0.98,L),COLORCYAN;
DRAWNUMBER(U3,L0.98,L),COLORCYAN; DRAWNUMBER(U4,L0.98,L),COLORCYAN;
{十战七胜}
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))100; A4:=SMA(A3,3,1); A5:=SMA(A4,3,1); A6:=3A4-2A5; A7:=C-REF(C,1); A8:=100EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买:=LLV(A8,2)=LLV(A8,7)ANDCOUNT(A8<0,2)ANDCROSS(A8,MA(A8,2));
DRAWTEXT(FILTER(买=1,5),LOW-0.05,’↖买进’),COLORYELLOW;
STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;

原创文章,作者:股神,如若转载,请注明出处:http://www.gupiaoxuexi.com/post/38240

发表评论

登录后才能评论