您现在的位置:好股网 >> 股票公式 >> 通达信公式 >> 一键转帖:微笑的主图和MACD背离配合使用

微笑的主图和MACD背离配合使用


指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2013-01-16 09:34:00
公式简介:

在发一个附图和主图把
主图是我在用的 其实就是个均线系统 分别为7 13 21 49
据说MACD背离的时候会有好事发生,但是我觉得最好还是看第二次信号,配合着均线系统最好!

主图源码:
MA7:MA(C,7),COLOR0000FF;
MA13:MA(C,13),COLOR0096FF;
MA21:MA(C,21),COLOR00FF99;
MA49:MA(C,49),COLORFF00FF;
A:=BARSCOUNT(CLOSE);
AH:=HHV(HIGH,200);
AL:=LLV(LOW,200);
B0:=(AH-AL)/40;
B1:=HIGH+B0;
B2:=LOW-B0;
DRAWTEXT((A+0)/34=FLOOR((A+0)/34),B2-2.2*B0*1.1,'变盘'),COLORRED;
DRAWTEXT(IF(CROSS(69,SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100),1,0),HIGH*1.045,'警'),COLORWHITE;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),4.1,1)/SMA(ABS(CLOSE-LC),4.1,1)*100;
DRAWICON(CROSS(RSI,11) ,L*0.99,3);
VAR28:=SMA(MAX(CLOSE-LC,0),5.5,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWTEXT(FILTER(EMA(CLOSE,60)-EMA(CLOSE,12)>0 AND EMA(CLOSE,12)/LOW>1.15,5),LOW,'买'),COLORFF00FF;
VARA:=((AMOUNT)/(VOL))/(100);
VARB:=((3)*(HIGH)+LOW+OPEN+(2)*(CLOSE))/(7);
VARC:=((SUM(AMOUNT,7))/(VARA))/(100);
VARD:=DMA(VARB,(VOL)/(VARC));
VARE:=((CLOSE-VARD)/(VARD))*(100);
VARF:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100);
VARJ:=MA(VARE,20)+STD(VARE,20);
BIAS18:=((CLOSE-MA(CLOSE,18))/(MA(CLOSE,18)))*(100);
AA:=SMA(VARF,3,1);
SS:=(REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND (AA>79);
DRAWTEXT((REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND (AA>SS) AND CROSS(84,RSI),H*1.028,'卖'),LINETHICK7,COLORGREEN;
DRAWTEXT(CROSS(84,RSI) AND CROSS(76,VAR28),H*1.01,'出'),LINETHICK7,COLORYELLOW;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,13)*21+C,49);
STICKLINE(CROSS(买线,卖线),OPEN,CLOSE,1.2,0),COLORYELLOW;
STICKLINE(CROSS(卖线,买线),OPEN,CLOSE,1.2,0),COLORBLUE;
V1:=EMA(CLOSE,60)-EMA(CLOSE,300);
V2:=EMA(V1,300);
V3:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
操盘线:=SMA(V3,2,1),LINETHICK3;
V5:=SMA(操盘线,2,1);
DRAWICON(CROSS(操盘线,V5) AND MA7>REF(MA7,1),L*0.987,5);
DRAWICON(操盘线<REF(操盘线,1) AND REF(操盘线,1)>REF(操盘线,2) AND MA21<REF(MA21,1) AND REF(操盘线,1)>40 AND CROSS(V5,操盘线),H*1.01,6);
STICKLINE((REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND (AA>SS) AND CROSS(84,RSI) AND CROSS(76,VAR28),C,O,3,0),COLORGREEN,LINETHICK2;{底位红色}
STICKLINE(操盘线>REF(操盘线,1) AND CROSS(操盘线,V5) AND V5<50 AND MA13<REF(MA13,1),C,O,3,0),COLORMAGENTA,LINETHICK2;{底位红色};




副图MACD背离专用源码:
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD1:=2*(DIFF-DEA),STICK;
MACD2:=EMA(MACD,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1,0),COLORGREEN;
STICKLINE(MACD1<MACD2,0,MACD1,1,0),COLORCBCBC0;
STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;
MACD:MACD1,NODRAW,COLORMAGENTA;
强:IF(DIFF>=DEA,DIFF,DRAWNULL),COLORRED,LINETHICK2;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,0.3,8,0),COLORYELLOW;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,0.2,8,0),COLORFF80FF;
DRAWICON(二次金叉,DEA*0.9,1) ;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.1,8,0),COLORRED;
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
VAR1:=(LOW+HIGH+CLOSE)/3;
操作:=MA(VAR1,5);
拉升:=HHV(操作,13);
QSXS:=操作>REF(操作,1) AND REF(操作,1)<REF(操作,2);
GJSC:=L<拉升 AND H>拉升 AND C>REF(C,1) AND C>O;
LSMR:=GJSC AND COUNT(QSXS,2);
买1:LSMR AND NOT(REF(LSMR,1));


 


 


[url=http://www.goodgupiao.com/gupiaogongshi/25143.html][B]微笑的主图和MACD背离配合使用[/B][/url]