画线主图 压力支撑线都画出 通达信主图指标 源码 贴图

2020-03-30 09:47:00来源:本站整理浏览:905

画线主图 压力支撑线都画出 通达信主图指标 源码 贴图

画线主图 压力支撑线都画出 通达信主图指标 源码 贴图

画线主图 压力支撑线都画出 通达信主图指标 源码 贴图


TYP := (HIGH + LOW + CLOSE)/3;
CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,6));
差值1:=ABS(REF(CCI1,1)-CCI1),LINETHICK0;
CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));
差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;
CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));
差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;
CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;
CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));
差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;
CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;
AAAB:=(3*C+H+L+O)/6;
VVAR1:=(8*AAAB+7*REF(AAAB,1)+6*REF(AAAB,2)+5*REF(AAAB,3)+4*REF(AAAB,4)+3*REF(AAAB,5)+2*REF(AAAB,6)+REF(AAAB,8))/36;
VVAR6:=(LLV(VVAR1,2)+LLV(VVAR1,4)+LLV(VVAR1,6))/3;
短线:IF(K=0, VVAR1, DRAWNULL),COLORWHITE;
中线:IF(K=0,VVAR6, DRAWNULL),COLORYELLOW;
下跌:IF(K=0 AND VVAR1=VVAR6,VVAR6, DRAWNULL),COLORGREEN;
中:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
上轨:=IF(K=1,中+3*STD(中,10),DRAWNULL),COLOR000088,LINETHICK5;
IF(K=1,2*MA(上轨,12)-MA(C,21),DRAWNULL),COLOR666666;
XXX1:=(C+L+H)/3;
XXX2:=EMA(XXX1,6),LINETHICK0;
XXX3:=EMA(XXX2,5),LINETHICK0;
牛背:=MA(C,21);
牛逼:=牛背+2*STD(C,21);
熊样:=牛背-2*STD(C,21);
熊样1:=IF(K=1,牛背-2*STD(C,21),DRAWNULL);
牛背2:=IF(K=1 AND C>牛背,牛背,DRAWNULL),LINETHICK3;
DRAWBAND(牛背2,RGB(58,58,58),熊样1,RGB(0,0,0));
IF(K=1,熊样1,DRAWNULL),COLOR666666;
STICKLINE(XXX2>=XXX3 AND K=1,XXX2,XXX3,4,1),COLOR557799;
STICKLINE(XXX2<XXX3 AND K=1,XXX2,XXX3,4,1),COLORAA5500;
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;
急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRAW;
离场:=IF(红持股,JRL,DRAWNULL);
明离场价:=离场,COLORFF99FF,NODRAW;
今离场价:=REF(离场,1)COLOR0000FF,NODRAW;
进:=IF(阴观望,JRH,DRAWNULL);
明进场价:=进,COLOR33AACC,NODRAW;
今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;
短买:=R19,COLOR33AACC,NODRAW;
GJ:=(C+H+L+O)/4;
明日阻力:=L+(GJ-L)+(C-L);
明日支撑:=L+(C-GJ);
KOH:=L>REF(H,1);
KOL:=H<REF(L,1);
HIF:=L>REF(H,BARSLAST(KOH)+1);
NHIF:=L<=REF(H,BARSLAST(KOH)+1);
LIF:=H<REF(L,BARSLAST(KOL)+1);
NLIF:=H>=REF(L,BARSLAST(KOL)+1);
下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
RRRSV:=SMA(下档线,3,1);
KKK:=SMA(RRRSV,3,1);
DDDDD:=((3 * RRRSV) - (2 * KKK));
JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);
RSV24:=SMA(JJ12,3,1);
K24:=SMA(RSV24,3,1);
D24:=((3 * RSV24) - (2 * K24));
压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)))),COLORFFFFFF;
底部:=LLV(HIGH,30),COLOR00FF00;
今日阻力:REF(明日阻力 , 1),NODRAW;
今日支撑:REF(明日支撑 , 1),NODRAW;
压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;
底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;
STICKLINE(ISLASTBAR AND (红持股 OR REF(红持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;
STICKLINE(ISLASTBAR AND (阴观望 OR REF(阴观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;
STICKLINE(ISLASTBAR ,压力位,压力位,120,0),COLORFFFFFF;
STICKLINE(ISLASTBAR ,底部位,底部位,100,0),COLOR00FF00;
STICKLINE(ISLASTBAR,今日阻力,今日阻力,10,1),COLORAAAAAA;
DRAWTEXT(ISLASTBAR,今日阻力,' 阻'),COLOR0000FF;
STICKLINE(ISLASTBAR,今日支撑,今日支撑,10,1),COLORAAAAAA;
DRAWTEXT(ISLASTBAR,今日支撑,' 支'),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,H ,L,0,1 ),COLORFFAA00;
STICKLINE(CLOSE>OPEN,H,L,0,1) ,COLOR0000CC;
CO:=(C-O);{WWW.GPXIAZAI.COM}
STICKLINE(红持股,C,O,2.8,0),COLOR0000BB;
STICKLINE(红持股,C,O,2,0),COLOR0000DD;
STICKLINE(阴观望,C,O,2.8,0),COLORBBBB00;
STICKLINE(阴观望,C,O,2,0),COLOREEEE00;
STICKLINE(急速超跌关注,O,C-CO/2,2.8,0),COLOR999999;
STICKLINE(短买,O,O+CO/3,2.8,0),COLOR008800;
STICKLINE(短买,O,O+CO/3,2,0),COLOR00EE00;
STICKLINE(秋离场,O,O+CO/3,2.8,0),COLORDD3300;
STICKLINE(秋离场,O,O+CO/3,2,0),COLORFF3300;
STICKLINE(C>0,O,C,0,0),COLORFFFFFF;
DRAWTEXT(秋离场,HHV(H,3),'→→→→'),COLORFF99FF;
DRAWTEXT(短买春,LLV(L,3),'←←←←'),COLOR00FF00;


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);
GDCS23:=CONST(REF(HIGH,DINGBUTS1-1)); DDCS23:=CONST(REF(L,DDTS2-1));
XG1:=BACKSET(ISLASTBAR,GDCS1); XD1:=BACKSET(ISLASTBAR,DDCS1);
XG2:=BACKSET(ISLASTBAR,DINGBUTS1); XD2:=BACKSET(ISLASTBAR,DDTS2);
XDD:=IF(DDCS13<=DDCS23,XD1,XD2);
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);
HH1:= REF(H,GDCS1-1),NODRAW;
HH2:= REF(H,GDCS2-1),NODRAW;
HH11:= REF(H,GDCS11-1),NODRAW;
HH22:= REF(H,GDCS22-1),NODRAW;
GHH:=MAX(MAX(REF(H,GDCS1-1),REF(H,GDCS2-1)),MAX(REF(H,GDCS11-1),REF(H,GDCS22-1))),NODRAW;
DLL:=MIN(MIN(REF(L,DDCS1-1),REF(L,DDCS2-1)),MIN(REF(L,DDCS11-1),REF(L,DDCS22-1))),NODRAW;
DX1:=(REF(H,GDCS1-1)-REF(H,GDCS2-1))/(GDCS2-GDCS1);
DDX1:=IF((REF(H,(GDCS1-1))+DX1*GDCS1)>ZGD2*1.02 OR (REF(H,(GDCS1-1))+DX1*GDCS1)<ZDD2*0.98,0,1);
DX2:=(REF(H,GDCS11-1)-REF(H,GDCS22-1))/(GDCS22-GDCS11);
DDDX1:=IF((REF(H,(GDCS11-1))+DX2*GDCS11)>ZGD2*1.02 OR (REF(H,(GDCS11-1))+DX2*DDCS11)<ZDD2*0.98,0,1);
LX1:=(REF(L,DDCS1-1)-REF(L,DDCS2-1))/(DDCS2-DDCS1);
LLX1:=IF((REF(L,(DDCS1-1))+LX1*DDCS1)<ZDD2*0.98 OR (REF(L,(GDCS1-1))+LX1*DDCS1)>ZGD2*1.02,0,1);
LX2:=(REF(L,DDCS11-1)-REF(L,DDCS22-1))/(DDCS22-DDCS11);
LLLX1:=IF((REF(L,(DDCS11-1))+LX2*DDCS11)<ZDD2*0.98 OR (REF(L,(DDCS11-1))+LX2*DDCS11)>ZGD2*1.02,0,1);
高压力:DRAWLINE(K=0 AND CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,DDX1),COLORYELLOW,LINETHICK1;
低支撑:DRAWLINE(K=0 AND CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,LLX1),COLORYELLOW,LINETHICK1;
DRAWLINE(K=0 AND CURRBARSCOUNT=GDCS22 ,H,CURRBARSCOUNT=GDCS11,H,DDDX1),COLORRED,LINETHICK1;
DRAWLINE(K=0 AND CURRBARSCOUNT=DDCS22 ,L,CURRBARSCOUNT=DDCS11,L,LLLX1),COLORRED,LINETHICK1;

 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式