通達信股票公式:分時主圖+自動畫線源碼
2015-02-09 14:21 南方財富網(wǎng)
通達信股票公式:分時主圖+自動畫線源碼
STICKLINE(C》0,H,L,6,1),COLOR000000;
分時線:C,COLOR8800FF,LINETHICK1;
MA55:MA(C,55),COLOR663636;
A:=CURRBARSCOUNT;
A1:=DAY!=REF(DAY,1);
A2:=BARSLAST(A1)+1;
A3:=MA(C,A2);
A4:=SUM(AMO,A2)/SUM(VOL,A2)/100;
A5:=IF(CAPITAL》0,A4,A3);
現(xiàn)價:IF(A《=CONST(A2),CLOSE,DRAWNULL)COLOR0098FF,LINETHICK1;
均價:IF(A《=CONST(A2),A5,DRAWNULL),COLORFF9800,LINETHICK1;
前收盤:IF(A《=CONST(A2),DYNAINFO(3),DRAWNULL),COLORRED,LINETHICK1;
RC:=DYNAINFO( 3);
S2:=SMA(C,2,1);
S6:=SMA(C,6,1);
DK:=2*(S2-S6);
STICKLINE(DK》0,RC,RC+DK,0,1),COLOR000036;
STICKLINE(DK《0,RC,RC+DK,0,1),COLOR003600;
AA1:=REF(分時線,P)=HHV(分時線,2*P+1);
BB1:=FILTER(AA1,P);
CC1:=BACKSET(BB1,P+1);
DD1:=FILTER(CC1,P);{高點}
AA2:=REF(分時線,P)=LLV(分時線,2*P+1);
BB2:=FILTER(AA2,P);
CC2:=BACKSET(BB2,P+1);
DD2:=FILTER(CC2,P);{低點}
上:=REF(分時線,BARSLAST(DD1)),COLORFF00FF,NODRAW;
下:=REF(分時線,BARSLAST(DD2)),COLOR00FF00,NODRAW;
相對能量:(分時線-下)/(上-下)*100,COLORYELLOW,NODRAW;
R11:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1);
S11:=R11》REF(R11,1);
壓力線:DRAWLINE(DD1,分時線,S11,分時線,1),COLORYELLOW;
T11:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);
U11:=T11》REF(T11,1);
支撐線:DRAWLINE(DD2,分時線,U11,分時線,1),COLOR00FF00;
STICKLINE(C》0,下,下,1,0),COLOR00FF00;
STICKLINE(C》0,上,上,1,0),COLORFF00FF;
DRAWICON(DD1,分時線,2);
DRAWICON(DD2,分時線,1);
STICKLINE(C》0,H,L,6,1),COLOR000000;
分時線:C,COLOR8800FF,LINETHICK1;
MA55:MA(C,55),COLOR663636;
A:=CURRBARSCOUNT;
A1:=DAY!=REF(DAY,1);
A2:=BARSLAST(A1)+1;
A3:=MA(C,A2);
A4:=SUM(AMO,A2)/SUM(VOL,A2)/100;
A5:=IF(CAPITAL》0,A4,A3);
現(xiàn)價:IF(A《=CONST(A2),CLOSE,DRAWNULL)COLOR0098FF,LINETHICK1;
均價:IF(A《=CONST(A2),A5,DRAWNULL),COLORFF9800,LINETHICK1;
前收盤:IF(A《=CONST(A2),DYNAINFO(3),DRAWNULL),COLORRED,LINETHICK1;
RC:=DYNAINFO( 3);
S2:=SMA(C,2,1);
S6:=SMA(C,6,1);
DK:=2*(S2-S6);
STICKLINE(DK》0,RC,RC+DK,0,1),COLOR000036;
STICKLINE(DK《0,RC,RC+DK,0,1),COLOR003600;
AA1:=REF(分時線,P)=HHV(分時線,2*P+1);
BB1:=FILTER(AA1,P);
CC1:=BACKSET(BB1,P+1);
DD1:=FILTER(CC1,P);{高點}
AA2:=REF(分時線,P)=LLV(分時線,2*P+1);
BB2:=FILTER(AA2,P);
CC2:=BACKSET(BB2,P+1);
DD2:=FILTER(CC2,P);{低點}
上:=REF(分時線,BARSLAST(DD1)),COLORFF00FF,NODRAW;
下:=REF(分時線,BARSLAST(DD2)),COLOR00FF00,NODRAW;
相對能量:(分時線-下)/(上-下)*100,COLORYELLOW,NODRAW;
R11:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1);
S11:=R11》REF(R11,1);
壓力線:DRAWLINE(DD1,分時線,S11,分時線,1),COLORYELLOW;
T11:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);
U11:=T11》REF(T11,1);
支撐線:DRAWLINE(DD2,分時線,U11,分時線,1),COLOR00FF00;
STICKLINE(C》0,下,下,1,0),COLOR00FF00;
STICKLINE(C》0,上,上,1,0),COLORFF00FF;
DRAWICON(DD1,分時線,2);
DRAWICON(DD2,分時線,1);