当前位置:→ 公式网 > 通达信公式 > 正文 ℃ 公式解密、改选股等业务 联系点击查看详情...
以下是通达信斋主趋势变色主图源码附图优化(无源码的请下载附件导入)
通达信斋主趋势变色主图源码附图优化
感谢同学们的关爱,现将指标给予优化,进一步规范了背景色,加入了背景提示供您参考。谢谢!!谢谢!!
源码 如下:
{n :1 ,100 ,9}
NN:=100;
高点:=CONST(HHV(H,NN)),NODRAW;
低点:=CONST(LLV(L,NN)),NODRAW;
JRH:=HHV(C,2);
JRL:=LLV(C,2);{公式在线提供:www.gszx.com.cn}
MA3:=MA(CLOSE,3);
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);
VAR3:=IF(C<200 ,MA(COST(80),3),2500),NODRAW;
VAR4:=(((HIGH + LOW) + CLOSE) / 3);
VAR5:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);
VAR6:=(VAR5 + ((VAR5 * 6) / 100));
短买:=R19,NODRAW,COLOR00DD00;
离场:=R1A,NODRAW,COLOR2288EE;
持股:=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;
Q1:=CONST(IF(短买,0,IF(离场,100,IF(持股,200,IF(急速超跌,100,150))))),NODRAW;
Q2:=CONST(IF(短买,150,IF(离场,180,IF(持股,0,IF(急速超跌,100,50))))),NODRAW;
Q3:=CONST(IF(短买,0,IF(离场,20,IF(持股,70,IF(急速超跌,100,150))))),NODRAW;
DRAWBAND(高点,RGB(Q1,Q2,Q3),低点,DRAWNULL);MA5:=MA(CLOSE,5),LINETHICK2;
MA13:MA(CLOSE,13),LINETHICK2;
DRAWBAND(MA5,RGB(250,200,00),MA13,RGB(00,150,200));
MA34:=MA(CLOSE,34),POINTDOT,LINETHICK4,COLORYELLOW;
GJ:=(C+H+L+O)/4;
日阻力:=L+(GJ-L)+(C-L),LINETHICK0;
日支撑:=L+(C-GJ),LINETHICK0;
日压:REF(日阻力 , 1),NODRAW,COLOR00FF00;
日支:REF(日支撑 , 1),NODRAW,COLORYELLOW;
STICKLINE(ISLASTBAR,日压,日压,30,1),LINETHICK2,COLOR00FF00;
STICKLINE(ISLASTBAR,日支,日支,30,1),LINETHICK2,COLORYELLOW;
FC:=C;
A:=EMA(FC,3);
B:=EMA(FC,5);
Z:=EMA(FC,15);
Z2:=MA(A,5);
玄悟斋主:=MA(Z,7);
個:=EMA(Z2,3);
十:=EMA(Z2,5) ;
百:=EMA(Z2,7);
千:=EMA(Z2,9);
万:=EMA(Z2,11);
K1:=BACKSET(個<REF(個,1),2);
谈:IF(K1,個,DRAWNULL),COLOR00AA00,LINETHICK1;
K2:=BACKSET(十<REF(十,1),2);
笑:IF(K2,十,DRAWNULL),COLOR00BB00,LINETHICK1;
K3:=BACKSET(百<REF(百,1),2);
皆:IF(K3,百,DRAWNULL),COLOR00CC00,LINETHICK1;
K4:=BACKSET(千<REF(千,1),2);
鸿:IF(K4,千,DRAWNULL),COLOR00DD00,LINETHICK1;
K5:=BACKSET(万<REF(万,1),2);
儒:IF(K5,万,DRAWNULL),COLOR00EE00,LINETHICK1;
K6:=BACKSET(個>REF(個,1),2);
往:IF(K6,個,DRAWNULL),COLOR0000AA,LINETHICK1;
K7:=BACKSET(十>REF(十,1),2);
来:IF(K7,十,DRAWNULL),COLOR0000BB,LINETHICK1;
K8:=BACKSET(百>REF(百,1),2);
无:IF(K8,百,DRAWNULL),COLOR0000CC,LINETHICK1;
K9:=BACKSET(千>REF(千,1),2);
白:IF(K9,千,DRAWNULL),COLOR0000DD,LINETHICK1;
K10:=BACKSET(万>REF(万,1),2);
丁:IF(K10,万,DRAWNULL),COLOR0000EE,LINETHICK1;
個Z:=EMA(玄悟斋主,3) ;
十Z:=EMA(玄悟斋主,5);
百Z:=EMA(玄悟斋主,7);
千Z:=EMA(玄悟斋主,9);
万Z:=EMA(玄悟斋主,11);
B1:=BACKSET(個Z<REF(個Z,1),2);
禅:IF(B1,個Z,DRAWNULL),COLORFFAA11,LINETHICK1;
B2:=BACKSET(十Z<REF(十Z,1),2);
味:IF(B2,十Z,DRAWNULL),COLORFFBB22,LINETHICK1;
B3:=BACKSET(百Z<REF(百Z,1),2);
闲:IF(B3,百Z,DRAWNULL),COLORFFCC33,LINETHICK1;
B4:=BACKSET(千Z<REF(千Z,1),2);
里:IF(B4,千Z,DRAWNULL),COLORFFDD44,LINETHICK1;
B5:=BACKSET(万Z<REF(万Z,1),2);
得:IF(B5,万Z,DRAWNULL),COLORFFEE55,LINETHICK1;
B6:=BACKSET(個Z>R