通达信牛股攻击逃顶指标公式
2021/5/31 18:42:32
DIFF1:EMA(CLOSE,12) - EMA(CLOSE,26);
DEA1 :EMA(DIFF1,9);
DIFF77:= EMA(CLOSE,12) - EMA(CLOSE,26);
DEA77:= EMA(DIFF77,9);
牛股攻击 : 2*(DIFF77-DEA77), COLORSTICK;
STICKLINE(牛股攻击>REF(牛股攻击,1) AND DIFF77>DEA77,牛股攻击,0,3,0),COLORRED;
STICKLINE(牛股攻击>REF(牛股攻击,1) AND DIFF77>DEA77,牛股攻击,0,1,0),COLORYELLOW;
DRAWBAND(DEA1,DRAWNULL,DIFF1,RGB(250,0,0));
DIFF:DIFF1,COLORWHITE;
DEA:DEA1,COLORYELLOW;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
MACD底背:IF(B1>0,-0.1,0),COLORRED,POINTDOT;
KDJ底背:IF(B2>0,-0.1,0),COLORFF00FF,POINTDOT;
RSI底背:IF(B3>0,-0.1,0),COLORYELLOW,POINTDOT;
MACD顶背:IF(D1>0,0.1,0),COLOR00FF00,POINTDOT;
KDJ顶背:IF(D2>0,0.1,0),COLORFFCC66,POINTDOT;
RSI顶背:IF(D3>0,0.1,0),COLORWHITE,POINTDOT;
STICKLINE(B1>0,-0.04,0,3,0),COLORRED,LINETHICK3;
STICKLINE(B2>0,-0.04,0,3,0),COLORFF00FF,LINETHICK5;
STICKLINE(B3>0,-0.04,0,3,0),COLORYELLOW,LINETHICK5;
STICKLINE(D1>0,0.04,0,3,0),COLOR00FF00,LINETHICK5;
STICKLINE(D2>0,0.04,0,3,0),COLORFFCC66,LINETHICK5;
STICKLINE(D3>0,0.04,0,3,0),COLORWHITE,LINETHICK5;
投股票 网 www.tou18.c n
[源码翻译]通达信软件动态翻译的结果
输出DIFF1:收盘价的12日指数移动平均 - 收盘价的26日指数移动平均
输出DEA1 :DIFF1的9日指数移动平均
DIFF77赋值: 收盘价的12日指数移动平均 - 收盘价的26日指数移动平均
DEA77赋值: DIFF77的9日指数移动平均
输出牛股攻击 : 2*(DIFF77-DEA77), COLORSTICK
当满足条件牛股攻击>1日前的牛股攻击ANDDIFF77>DEA77时,在牛股攻击和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,画红色
当满足条件牛股攻击>1日前的牛股攻击ANDDIFF77>DEA77时,在牛股攻击和0位置之间画柱状线,宽度为1,0不为0则画空心柱.,画黄色
画带状线
输出DIFF:DIFF1,画白色
输出DEA:DEA1,画黄色
A1赋值:上次1日前的DIFF上穿DEA距今天数
B1赋值:A1+1日前的收盘价>收盘价 AND A1+1日前的DIFF<DIFF AND DIFF上穿DEA
A2赋值:上次1日前的"KDJ的K"(9,3,3)上穿"KDJ的D"(9,3,3)距今天数
B2赋值:A2+1日前的收盘价>收盘价 AND A2+1日前的"KDJ的K"(9,3,3)<"KDJ的K"(9,3,3) AND "KDJ的K"(9,3,3)上穿"KDJ的D"(9,3,3)
A3赋值:上次1日前的"RSI的RSI1"(6,12,24)上穿"RSI的RSI2"(6,12,24)距今天数
B3赋值:A3+1日前的收盘价>收盘价 AND A3+1日前的"RSI的RSI1"(6,12,24)<"RSI的RSI1"(6,12,24) AND "RSI的RSI1"(6,12,24)上穿"RSI的RSI2"(6,12,24)
C1赋值:上次1日前的DEA上穿DIFF距今天数
D1赋值:C1+1日前的收盘价<收盘价 AND C1+1日前的DIFF>DIFF AND DEA上穿DIFF
C2赋值:上次1日前的"KDJ的D"(9,3,3)上穿"KDJ的K"(9,3,3)距今天数
D2赋值:C2+1日前的收盘价<收盘价 AND C2+1日前的"KDJ的K"(9,3,3)>"KDJ的K"(9,3,3) AND "KDJ的D"(9,3,3)上穿"KDJ的K"(9,3,3)
C3赋值:上次1日前的"RSI的RSI2"(6,12,24)上穿"RSI的RSI1"(6,12,24)距今天数
D3赋值:C3+1日前的收盘价<收盘价 AND C3+1日前的"RSI的RSI1"(6,12,24)>"RSI的RSI1"(6,12,24) AND "RSI的RSI2"(6,12,24)上穿"RSI的RSI1"(6,12,24)
输出MACD底背:如果B1>0,返回-0.1,否则返回0,画红色,POINTDOT
输出KDJ底背:如果B2>0,返回-0.1,否则返回0,COLORFF00FF,POINTDOT
输出RSI底背:如果B3>0,返回-0.1,否则返回0,画黄色,POINTDOT
输出MACD顶背:如果D1>0,返回0.1,否则返回0,COLOR00FF00,POINTDOT
输出KDJ顶背:如果D2>0,返回0.1,否则返回0,COLORFFCC66,POINTDOT
输出RSI顶背:如果D3>0,返回0.1,否则返回0,画白色,POINTDOT
当满足条件B1>0时,在-0.04和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,画红色,线宽为3
当满足条件B2>0时,在-0.04和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLORFF00FF,线宽为5
当满足条件B3>0时,在-0.04和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,画黄色,线宽为5
当满足条件D1>0时,在0.04和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLOR00FF00,线宽为5
当满足条件D2>0时,在0.04和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLORFFCC66,线宽为5
当满足条件D3>0时,在0.04和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,画白色,线宽为5
股市公式下载推荐