通达信画线主图一指标公式
通达信主升指标公式
通达信画线主图一指标公式:
K:=1;
DRAWGBK(ISLAstBAR,RGB(0,0,0),RGB(0,0,0),0,'0001',0);
AA10:=MA(C,10);
BB10:=ATAN((AA10-REF(AA10,1)))*180/3.1416;
DRAWBAND(AA10,RGB(255,0,0),REF(AA10,1),RGB(0,255,0)),COLORRED;
STICKLINE(BB10<1 AND AA10<REF(AA10,1), AA10,REF(AA10,1),0.1,0),COLORGREEN;
AA20:=MA(C,20);
BB20:=ATAN((AA20-REF(AA20,1)))*180/3.1416;
DRAWBAND(AA20,RGB(255,0,255),REF(AA20,1),RGB(0,0,255)),COLORMAGENTA;
STICKLINE(BB20<1,AA20,REF(AA20,1),0.1,0),COLORBLUE;
N1:=20;
N2:=10;
N3:=5;
AA:=REF(H,N1)=HHV(H,2*N1+1);
QY:=BacKSET(AA,N1+1);
CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);
DDD:=BArslAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
AA1:=REF(L,N1)=LLV(L,2*N1+1);
QY1:=BACKSET(AA1,N1+1);
CC1:=FILTER(QY1,N1) AND L=LLV(L,N1+1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
YDB:=IF(DD1,REF(L,DD1),L);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
ZDB:=REF(YDB,DD1+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
LAA:=REF(H,N2)=HHV(H,2*N2+1);
LQY:=BACKSET(LAA,N2+1);
LCC:=FILTER(LQY,N2) AND H=HHV(H,N2+1);
LDDD:=BARSLAST(LCC);
LGDTS:=IF(LCC,CURRBARSCOUNT,0);
LDINGBU:=IF(LDDD,REF(H,LDDD),H);{顶部}
LDINGBUTS:=IF(LDDD,REF(LGDTS,LDDD),LGDTS);
LDINGBU1:=REF(LDINGBU,LDDD+1);
LGDCS1:=CONST(LDINGBUTS);
LDINGBUTS1:=REF(LDINGBUTS,LDDD+1);
LGDCS2:=CONST(LDINGBUTS1);
LDINGBU2:=REF(LDINGBU1,LDDD+1);
LMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);
LAA1:=REF(L,N2)=LLV(L,2*N2+1);
LQY1:=BACKSET(LAA1,N2+1);
LCC1:=FILTER(LQY1,N2) AND L=LLV(L,N2+1);
LDD1:=BARSLAST(LCC1);
LDDTS:=IF(LCC1,CURRBARSCOUNT,0);
LYDB:=IF(LDD1,REF(L,LDD1),L);
LDDTS1:=IF(LDD1,REF(LDDTS,LDD1),LDDTS);
LDDCS1:=CONST(LDDTS1);
LZDB:=REF(LYDB,LDD1+1);
LDDTS2:=REF(LDDTS1,DD1+1);
LDDCS2:=CONST(LDDTS2);
DDYL2:=DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1,H,1) COLORWHITE;
DDZC2:=DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1,L,1) COLORWHITE;
ZGSTAR:=(DDYL2+DDZC2)/2;
ZGEND:=CONST((DDYL2+DDZC2)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
LLAA:=REF(H,N3)=HHV(H,2*N3+1);
LLQY:=BACKSET(LLAA,N3+1);
LLCC:=FILTER(LLQY,N3) AND H=HHV(H,N3+1);
LLDDD:=BARSLAST(LLCC);
LLGDTS:=IF(LLCC,CURRBARSCOUNT,0);
LLDINGBU:=IF(LLDDD,REF(H,LLDDD),H);{顶部}
LLDINGBUTS:=IF(LLDDD,REF(LLGDTS,LLDDD),LLGDTS);
LLDINGBU1:=REF(LLDINGBU,LLDDD+1);
LLGDCS1:=CONST(LLDINGBUTS);
LLDINGBUTS1:=REF(LLDINGBUTS,LLDDD+1);
LLGDCS2:=CONST(LLDINGBUTS1);
LLDINGBU2:=REF(LLDINGBU1,LLDDD+1);
LLMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);
{DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,ISLASTBAR,REF(H,LLGDCS2-1),1),COLOR0055FF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=LLGDCS1,H,ISLASTBAR,REF(H,LLGDCS1-1),1),COLORYELLOW,POINTDOT;}
LLAA1:=REF(L,N3)=LLV(L,2*N3+1);
LLQY1:=BACKSET(LLAA1,N3+1);
LLCC1:=FILTER(LLQY1,N3) AND L=LLV(L,N3+1);
LLDD1:=BARSLAST(LCC1);
LLDDTS:=IF(LLCC1,CURRBARSCOUNT,0);
LLYDB:=IF(LLDD1,REF(L,LLDD1),L);
LLDDTS1:=IF(LLDD1,REF(LLDDTS,LLDD1),LDDTS);
LLDDCS1:=CONST(LLDDTS1);
LLZDB:=REF(LLYDB,LLDD1+1);
LLDDTS2:=REF(LLDDTS1,DD1+1);
LLDDCS2:=CONST(LLDDTS2);
GDYL3:=DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS1,H,1) COLORYELLOW;
DDZC3:=DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS1,L,1) COLORYELLOW;
LZGSTAR:=(GDYL3+DDZC3)/2;
LZGEND:=CONST((GDYL3+DDZC3)/2);
LSTARDAY:=IF(LLDDCS2<LLGDCS2,LLDDCS2,LLGDCS2);
GDYL1:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORRED;
DDZC1:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED;
{,长压:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORRED,DOTLINE;}
长支:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORMAGENTA,DOTLINE;
中压:DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1,H,1) COLORRED,DOTLINE;
中支:DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1,L,1) COLORMAGENTA,DOTLINE;
{短压:DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS1,H,1) COLORYELLOW,DOTLINE;
短支:DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS1,L,1) COLORWHITE,DOTLINE;}
①:DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLORYELLOW,POINTDOT;
②:DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT;
{③:DRAWLINE(CURRBARSCOUNT=LGDCS2,H,ISLASTBAR,REF(H,LGDCS2-1),1),COLORGREEN,POINTDOT;
④:DRAWLINE(CURRBARSCOUNT=LGDCS1,H,ISLASTBAR,REF(H,LGDCS1-1),1),COLORGREEN,POINTDOT;}
⑤:DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORMAGENTA,POINTDOT;
⑥:DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORMAGENTA,POINTDOT;
JRH:=HHV(C,2);
JRL:=LLV(C,2);
ZGD:=HHV(REF((C*2-REF(C,3)),3),60)*0.99,COLOR008888;
ZDD:=LLV(REF((C*2-REF(C,3)),3),60),COLOR008888;
ZGD2:=IF(K=0,CONST(ZGD),DRAWNULL);
ZDD2:=IF(K=0,CONST(ZDD),DRAWNULL);
YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;
R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));
RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;
R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);
短买春:=R19,NODRAW,COLOR00DD00;
秋离场:=R1A,NODRAW,COLOR2288DD;
红持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,NODRAW,COLOR0000FF;
阴观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,NODRAW,COLOR999999;
离场:=IF(红持股,JRL,DRAWNULL);
明离场价:=离场,COLORFF99FF,NODRAW;
今离场价:=REF(离场,1)COLOR0000FF,NODRAW;
进:=IF(阴观望,JRH,DRAWNULL);
明进场价:=进,COLOR33AACC,NODRAW;
今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;
短买:=R19,COLOR33AACC,NODRAW;
STICKLINE(OPEN>=CLOSE ,H ,L,0,1 ),COLORFFAA00;
STICKLINE(CLOSE>OPEN,H,L,0,1) ,COLOR0000CC;
CO:=(C-O);
STICKLINE(红持股,C,O,3.2,0),COLOR000066;
STICKLINE(红持股,C,O,2.0,0),COLOR000077;
STICKLINE(红持股,C,O,1.5,0),COLOR000099;
STICKLINE(红持股,C,O,0.9,0),COLOR0000CC;
STICKLINE(红持股,C,O,0.5,0),COLOR0000FF;
STICKLINE(阴观望,C,O,3.2,0),COLOR888800;
STICKLINE(阴观望,C,O,2.0,0),COLOR999900;
STICKLINE(阴观望,C,O,1.5,0),COLORAAAA00;
STICKLINE(阴观望,C,O,0.9,0),COLORBBBB00;
STICKLINE(阴观望,C,O,0.5,0),COLORCCCC00;
STICKLINE(短买,O,O+CO/3,3.2,0),COLOR3666EE;
STICKLINE(短买,O,O+CO/3,2.0,0),COLOR2299EE;
STICKLINE(短买,O,O+CO/3,1.5,0),COLOR11AAEF;
STICKLINE(短买,O,O+CO/3,0.9,0),COLOR00BBFE;
STICKLINE(短买,O,O+CO/3,0.5,0),COLOR00CCFE;
STICKLINE(秋离场,O,O+CO/3,3.2,0),COLOR009900;
STICKLINE(秋离场,O,O+CO/3,2.0,0),COLOR00BB00;
STICKLINE(秋离场,O,O+CO/3,1.5,0),COLOR00DD00;
STICKLINE(秋离场,O,O+CO/3,0.9,0),COLOR00FF00;
STICKLINE(秋离场,O,O+CO/3,0.5,0),COLOR00FF00;
STICKLINE(C>0,O,C,0,0),COLORFFFFFF;
CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
YJD:=(EMA(CS,3)-50)*2;
极弱:=-80;
弱势:=-60;
VAR4:=(1.1)*CLOSE;
VAR5:=(0.9)*CLOSE;
VAR6:=100*(WINNER(VAR4)-WINNER(VAR5));
S1:=2*EMA(100-VAR6,1),COLORYELLOW;
S2:=EMA(S1,9);
S3:=MA(S2,9);
DRAWICON(crOSS(YJD,极弱) AND S1>S2 AND (IF(C>O,O,C)-L)/IF(C>O,O,C)*100>=1,L,1);
DRAWICON(REF(CROSS(YJD,极弱) AND S1>S2 AND (IF(C>O,O,C)-L)/IF(C>O,O,C)*100>=1,1) AND CROSS(YJD,弱势) AND R19,L*0.99,13);
DRAWICON(CROSS(YJD,弱势) AND C>MA(CLOSE,60) AND R19,L,23);
CCC:=CROSS(H,MA(L+(H-L)/2,25)*1.15);
DRAWICON(CCC AND MA(L+(H-L)/2,75)>=REF(MA(L+(H-L)/2,75),1),H,2);
HHH:=CROSS(C,MA(L+(H-L)/2,25)*0.95);
DRAWTEXT(R19 AND HHH AND MA(L+(H-L)/2,75)>=REF(MA(L+(H-L)/2,75),1),L,'↖波段买'),COLORYELLOW;
通达信主力被套指标公式