支撑压力优化版主图源码【通达信】

Home Page > 社会 > Content 2021-03-10

Topic:最专业的股票论坛


N:=100;
NN:=100;
AA:=REF(H,N)=HHV(H,2*N+1);  AA1:=REF(L,N)=LLV(L,2*N+1);
QY:=BACKSET(AA,N+1);  QY1:=BACKSET(AA1,N+1);
CC:=FILTER(QY,N) AND H=HHV(H,N+1);  CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);
DDD:=BARSLAST(CC);  DD1:=BARSLAST(CC1);
GDTS:=IF(CC,CURRBARSCOUNT,0);  DDTS:=IF(CC1,CURRBARSCOUNT,0);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);  DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
GDCS1:=CONST(DINGBUTS);  DDCS1:=CONST(DDTS1);
GDCS13:=CONST(REF(HIGH,GDCS1-1));  DDCS13:=CONST(REF(L,DDCS1-1));
DINGBUTS1:=REF(DINGBUTS,DDD+1);  DDTS2:=REF(DDTS1,DD1+1);
GDCS2:=CONST(DINGBUTS1);  DDCS2:=CONST(DDTS2);
M:=INTPART(3*N/5);
AAA:=REF(H,M)=HHV(H,2*M+1);
QYY:=BACKSET(AAA,M+1);
CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);
DDDD:=BARSLAST(CCC),NODRAW;
GDTSS:=IF(CCC,CURRBARSCOUNT,0);
DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);
GDCS11:=CONST(DINGBUTSS);
DINGBUTS11:=REF(DINGBUTSS,DDDD+1);
GDCS22:=CONST(DINGBUTS11);
AA11:=REF(L,M)=LLV(L,2*M+1);
QY11:=BACKSET(AA11,M+1);
CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);
DD11:=BARSLAST(CC11);
DDTSS:=IF(CC11,CURRBARSCOUNT,0);
DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);
DDCS11:=CONST(DDTS11);
DDTS22:=REF(DDTS11,DD11+1);
DDCS22:=CONST(DDTS22);
ZGD:=HHV(H,60)*1.01.00;
ZGD2:=CONST(ZGD);
高点压力M:=DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORRED,LINETHICK2;
低点支撑M:=DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1) COLORRED,LINETHICK2;
高点压力1:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) ,COLORBLUE,LINETHICK2;
低点支撑1:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1),COLORBLUE,LINETHICK2;


高点:=CONST(HHV(H,NN));
低点:=CONST(LLV(L,NN));
GJ:=(C+H+L+O)/4;
明日阻力:=L+(GJ-L)+(C-L);
明日支撑:=L+(C-GJ);
明日阻力2:=L+2*(GJ-L)+(C-L);
明日支撑2:=L+(C-GJ)-(GJ-L);
Today resistance: =CONST(REF(Tomorrow resistance, 1)),NODRAW;
Today support: =CONST(REF(Tomorrow support, 1)),NODRAW;
Today resistance 2:=CONST(REF(Tomorrow resistance 2, 1)),NODRAW;
Today’s support 2:=CONST(REF(Tomorrow support 2, 1)),NODRAW;
STICKLINE(ISLASTBAR ,Today resistance,Today resistance 2,10,0),COLOR555555;
DRAWTEXT(ISLASTBAR,Today resistance,'Resistance'),COLOR0000FF;
STICKLINE(ISLASTBAR,Today support,Today support 2,10,0) ,COLOR555555;
DRAWTEXT(ISLASTBAR,support today,'support'),COLOR00FF00;


IF(BETWEEN(high point pressure M, high point, low point), high point pressure M, DRAWNULL) ,COLORWHITE,LINETHICK2;
IF(BETWEEN (low point support M, high point, low point), low point support M, DRAWNULL), COLORWHITE, LINETHICK2;
IF(BETWEEN (high point pressure 1, high point , Low point), high point pressure 1, DRAWNULL), COLORGREEN, LINETHICK2;
IF(BETWEEN (low point support 1, high point, low point), low point support 1, DRAWNULL), COLORGREEN, LINETHICK2;


Daily limit: =C>REF(C,1)*1.099;
Opening price: REF(O,BARSLAST (rising limit)), COLORWHITE, CIRCLEDOT;
DRAWNUMBER (rising limit, L, O) ,COLORRED;
C3:=REF(C,1);
Lower limit:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(Limit down,OPEN,CLOSE,4,0),COLORGREEN;
STICKLINE(Limit down,OPEN,CLOSE,3,0),COLORBLUE;
DRAWTEXT(Limit down,H+0.3,'Limit down' ),COLORBLUE;
STICKLINE(V>=REF(V,1)*2,O,C,3,0)COLORBLUE;
STIC KLINE(V>=REF(V,1)*2,H,L,0,0)COLORBLUE;
STICKLINE(C/REF(C,1)>=1.098,O,C,3,0)COLORRED ;
STICKLINE(C/REF(C,1)>=1.098,H,L,0,0)COLORRED;
STICKLINE(C/REF(C,1)

Label group:[源码] [const

Extended reading

Same topic

recommend

Popular