当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码:恶魔的眼泪,MACD周期共鸣,分钟多空

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、恶魔的眼泪

{恶魔的眼泪 机构流下了眼泪,我们微笑面对}

X_1:=MA(CLOSE,5);
X_2:=MA(CLOSE,13);
X_3:=MA(CLOSE,34);
X_4:=SMA(MAX(CLOSE-REF(CLOSE,1),0),17,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),17,1)*100;
X_5:=BARSLAST(CROSS(X_1,X_2));
X_6:=BARSLAST(CROSS(X_1,X_3));
X_7:=BARSLAST(CROSS(X_2,X_3));
X_8:=X_5>=X_6 AND X_6>X_7 AND X_5-X_7<20;
X_9:=COUNT(CROSS(X_1,X_2),X_5+1)=1 AND COUNT(CROSS(X_1,X_3),X_5+1)=1 AND CROSS(X_2,X_3) AND X_1>X_2 AND X_2>X_3;
X_10:=X_1>REF(X_1,1) AND X_2>REF(X_2,1) AND X_3<REF(X_3,1);
X_11:=X_1>REF(X_1,1) AND X_2>REF(X_2,1) AND X_3>REF(X_3,1);
X_12:=EMA(CLOSE,3);
X_13:=EMA(SLOPE(CLOSE,34)*5+CLOSE,21);
短线买点:CROSS(X_12,X_13),NODRAW,COLORRED;
强势短线买点:CROSS(X_12,X_13) AND X_11,NODRAW,COLORMAGENTA;
弱加仓:X_8 AND X_9 AND X_10,NODRAW,COLORWHITE;
强加仓:X_8 AND X_9 AND X_11,NODRAW,COLORYELLOW;
最后卖点:CROSS(X_13,X_12),NODRAW,COLORGREEN;
短线区间:COUNT(短线买点,BARSLAST(短线买点)+1)=1 AND COUNT(最后卖点,BARSLAST(短线买点)+1)=0,NODRAW,COLORGRAY;
STICKLINE(短线区间>0,10,90,4,0),COLORGRAY;
STICKLINE(短线买点>0,0,100,4,0),COLORRED;
STICKLINE(强势短线买点>0,0,100,4,0),COLORMAGENTA;
STICKLINE(最后卖点>0,0,100,4,0),COLORGREEN;
STICKLINE(弱加仓>0,0,100,4,0),COLORWHITE;
STICKLINE(强加仓>0,0,100,4,0),COLORYELLOW;



2、MACD周期共鸣,钻石出现关注( 顶尖财经 股票学院: http://www.58188.com )

{MACD周期共鸣}
0;
70;
80;
{60分}
DIF60:=EMA(CLOSE,12/4)-EMA(CLOSE,26/4);
DEA60:=EMA(DIF60,9/4);
DRAWICON(DIF60>=DEA60,65,1);
DRAWICON(DIF60<DEA60,65,2);
{120分}
DIF120:=EMA(CLOSE,12/2)-EMA(CLOSE,26/2);
DEA120:=EMA(DIF120,9/2);
DRAWICON(DIF120>=DEA120,60,1);
DRAWICON(DIF120<DEA120,60,2);
{180分}
DIF180:=EMA(CLOSE,12/4*3)-EMA(CLOSE,26/3*2);
DEA180:=EMA(DIF180,9/4*3);
DRAWICON(DIF180>=DEA180,55,1);
DRAWICON(DIF180<DEA180,55,2);
{1日}
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
DRAWICON(DIF>=DEA,50,1);
DRAWICON(DIF<DEA,50,2);
{2日}
DIF2:=EMA(CLOSE,12*2)-EMA(CLOSE,26*2);
DEA2:=EMA(DIF2,9*2);
DRAWICON(DIF2>=DEA2,45,1);
DRAWICON(DIF2<DEA2,45,2);
{3日}
DIF3:=EMA(CLOSE,12*3)-EMA(CLOSE,26*3);
DEA3:=EMA(DIF3,9*3);
DRAWICON(DIF3>=DEA3,40,1);
DRAWICON(DIF3<DEA3,40,2);
{4日}
DIF4:=EMA(CLOSE,12*4)-EMA(CLOSE,26*4);
DEA4:=EMA(DIF4,9*4);
DRAWICON(DIF4>=DEA4,35,1);
DRAWICON(DIF4<DEA4,35,2);
{周}
周MD:=MACD.DIF#WEEK;
周MA:=MACD.DEA#WEEK;
DRAWICON(周MD>=周MA,30,1);
DRAWICON(周MD<周MA,30,2);
{8日}
DIF8:=EMA(CLOSE,12*8)-EMA(CLOSE,26*8);
DEA8:=EMA(DIF8,9*8);
DRAWICON(DIF8>=DEA8,25,1);
DRAWICON(DIF8<DEA8,25,2);
{12日}
DIF12:=EMA(CLOSE,12*12)-EMA(CLOSE,26*12);
DEA12:=EMA(DIF12,9*12);
DRAWICON(DIF12>=DEA12,20,1);
DRAWICON(DIF12<DEA12,20,2);
{16日}
DIF16:=EMA(CLOSE,12*16)-EMA(CLOSE,26*16);
DEA16:=EMA(DIF16,9*16);
DRAWICON(DIF16>=DEA16,15,1);
DRAWICON(DIF16<DEA16,15,2);
{1月}
月MD:=MACD.DIF#MONTH;
月MA:=MACD.DEA#MONTH;
DRAWICON(月MD>=月MA,10,1);
DRAWICON(月MD<月MA,10,2);
{共振力度}
DRAWICON(DIF120>=DEA120 AND DIF180>=DEA180 AND DIF>=DEA AND DIF2>=DEA2 AND DIF3>=DEA3 AND DIF4>=DEA4 AND 
周MD>=周MA AND DIF8>=DEA8 AND DIF12>=DEA12 AND DIF16>DEA16 AND 月MD>=月MA ,80,26);
DRAWICON(DIF60>=DEA60 AND DIF120>=DEA120 AND DIF180>=DEA180 AND DIF>=DEA AND DIF2>=DEA2 AND DIF3>=DEA3 AND DIF4>=DEA4 AND 
周MD>=周MA AND DIF8>=DEA8 AND DIF12>=DEA12 AND DIF16>DEA16 AND 月MD>=月MA ,80,25);



3、分钟多空,分钟周期显示在日线周期

RSV:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100; 

短多:SMA(RSV,3,1),COLOR2626FF,LINETHICK1; 
短空:SMA(短多,3,1),COLORFFFF00,LINETHICK1; 
RSV1:=(CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*100; 
中多:SMA(RSV1,5,1),COLOR00009B,LINETHICK1;
中空:SMA(中多,10,1),COLOR797900,LINETHICK1;
DRAWBAND(中多,RGB(898,0,1),中空,RGB(05,58,58));
DRAWBAND(短多,RGB(248,918,18),短空,RGB(0,188,198));
短期:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)),COLORWHITE,LINETHICK2;
中期:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10)),COLORYELLOW;
中长期:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20)),COLORMAGENTA;
长期:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),COLOR0000FF,LINETHICK1;
长强势区:=IF((EVERY(短多>=REF(短多,1),1)AND 短多<短空),5,0)COLOR0000FF,LINETHICK2;
低买:IF((CROSS(长强势区,0.1)),10,0)NODRAW,COLORFF00FF,LINETHICK1;
长强势区1:=IF((EVERY(中多>=REF(中多,1),1)AND 中多<18),5,0)COLOR0000FF,LINETHICK2;
低买1:IF((CROSS(长强势区1,0.1)),5,0)NODRAW,COLORFF00FF,LINETHICK1;
长强势区11:=IF((EVERY(中多<=REF(中多,1),1)AND 中多>85),5,0)COLOR0000FF,LINETHICK2;
高卖11:IF((CROSS(长强势区11,0.1)),105,110)NODRAW,COLOR6A6A00,LINETHICK1;
长强势区2:=IF((EVERY(短多<=REF(短多,1),1)AND 短多>短空),5,0)COLOR0000FF,LINETHICK2;
高卖2:IF((CROSS(长强势区2,0.1)),100,110)NODRAW,COLOR6A6A00;
短期2:100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)),COLORFFFFFF,LINETHICK1;
中期2:100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10)),NODRAW ,COLORC0C0C0;
中长期2:100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20)),NODRAW ,COLOR00A8A8;
长期2:100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),COLOR1111FF,LINETHICK2;
强市线:80,DOTLINE,COLOR000079;
弱市线:20,DOTLINE,COLORC08000;
分水岭:50,POINTDOT,COLORFFFFFF;
买线:=EMA(C,1);
卖线:=EMA(SLOPE(C,10)*10+C,20);

上一篇:通达信源码:组合买卖,港资+融资指标,多指标叠加

下一篇:通达信源码:主力增减仓,时来好运,波段神器