软件名称:[B]通达信MACD趋势指标公式[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:11.0 KB
官方主页:Home Page
更新时间:2015-03-04 06:04:37
软件简介:
DRAWGBK(C>0, RGB(0,0,00),RGB(0,0,0),0,'W20',0);
DRAWKLINE(H,O,L,C);
QWX1:=HHV(CLOSE,30);
QWX2:=LLV(CLOSE,30);
QWX3:=CONST((QWX1+QWX2)/2);
QWX4:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
QWX5:=CONST((1-7/100)*(DMA(CLOSE,QWX4)));
QWX6:=CONST((1+7/100)*(DMA(CLOSE,QWX4)));
{KDJ}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
KX:=SMA(RSV,3,1);
DX:=SMA(KX,3,1);
JX:=3*KX-2*DX;
{MACD}
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*2+QWX3,COLORWHITE;
DEA:=EMA(DIF,9),COLORYELLOW;
MACD:(DIF-DEA)*5+QWX3,COLORYELLOW,LINETHICK2;
DRAWBAND(MACD,RGB(120,0,100),QWX3,RGB(60,100,50));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
牛熊线:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2,LINETHICK2,COLORRED;
M5:MA(CLOSE,5),COLORWHITE,DOTLINE;
IF(MA(C,5)>=REF(MA(C,5),1),MA(C,5),DRAWNULL),COLORYELLOW,LINETHICK3;
M10:MA(CLOSE,10),COLORYELLOW,DOTLINE;
IF(MA(C,10)>=REF(MA(C,10),1),MA(C,10),DRAWNULL),COLOR330099,LINETHICK2;
M20:MA(CLOSE,20),COLORFF00FF;
IF(MA(C,20)>=REF(MA(C,20),1),MA(C,20),DRAWNULL),COLORLIMAGENTA,LINETHICK2;
M60:MA(CLOSE,60),COLOR6699CC;
IF(MA(C,60)>=REF(MA(C,60),1),MA(C,60),DRAWNULL),CIRCLEDOT,LINETHICK2;
M120:MA(CLOSE,120),COLORLIBLUE,DOTLINE;
M250:MA(CLOSE,250),COLORMAGENTA,DOTLINE;
VAR1:=IF(CLOSE>OPEN,CLOSE,OPEN);
VAR2:=MEMA(CLOSE,5);
VAR3:=ATAN((VAR2/REF(VAR2,1)-1)*100);
VAR4:=IF(VAR3>0,VAR3,VAR3);
VAR5:=(CLOSE/REF(CLOSE,1)-1)*100;
VAR6:=VAR5<1.5 AND VAR5>-1.5;
今日之升★:LAST(VAR6,4,1) AND VAR5>2 AND VOL>REF(VOL,1),NODRAW,COLORYELLOW;
DRAWTEXT(今日之升★,L/1.01,'★'),COLORYELLOW;
强势:IF(VAR4>=REF(VAR4,1) AND VAR4>=0,M10,DRAWNULL),COLORRED,LINETHICK2;
整理:IF(VAR4<REF(VAR4,1) AND VAR4>0,M10,DRAWNULL),COLORGREEN,LINETHICK2;
支撑:IF(PERIOD=5,IF(BARSLAST(CURRBARSCOUNT=5),QWX5,DRAWNULL),DRAWNULL),COLORCYAN;
阻力:IF(PERIOD=5,IF(BARSLAST(CURRBARSCOUNT=5),QWX6,DRAWNULL),DRAWNULL),COLORYELLOW;
N:=120;
K:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));{高点}
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));{低点}
KJ:=GD-DD;{高低点差值=分区高度}
GD4:IF(CURRBARSCOUNT<=N/30,GD,DRAWNULL);
底:IF(CURRBARSCOUNT<=N/30,DD,DRAWNULL),COLORFFFF00;
高:IF(CURRBARSCOUNT<=N/30,GD,DRAWNULL),COLOR00FFFF;
撑:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.191,DRAWNULL),COLOR00FFFF;
强: IF(CURRBARSCOUNT<=N/30,DD+KJ*0.382,DRAWNULL),COLORFF00FF;
突破:IF(CURRBARSCOUNT<=N/30,DD+KJ/2,DRAWNULL),COLOR0000FF;
警示:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.618,DRAWNULL),COLOR00FFFF;
压力:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.809,DRAWNULL),COLOR00FF00;
低涨:IF(CURRBARSCOUNT<=N/30,(C/LLV(LOW,K)-1)*100,DRAWNULL),COLOR0000FF,NODRAW;
天数:BARSLAST(L=DD),COLORCYAN,NODRAW;
今日保护价:(REF(C,2)+REF(C,1)+O)/3 ,COLORCC3299,NODRAW;
顶点:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORRED,DOTLINE;
低点:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORYELLOW,DOTLINE;
STICKLINE(CCI>=200 AND H>=顶点,O,C,3,0),COLORBLUE;
STICKLINE(CCI<=100 AND L<=低点,O,C,3,0),COLORYELLOW;
DRAWBAND(高,RGB(200,200,0),压力,RGB(0,0,0));
DRAWBAND(压力,RGB(0,190,0),警示,RGB(0,0,0));
DRAWBAND(警示,RGB(220,120,0),突破,RGB(0,0,0));
DRAWBAND(突破,RGB(120,0,120),强势,RGB(0,0,0));
DRAWBAND(强势,RGB(120, 0,0),支撑,RGB(0,0,0));
DRAWBAND(支撑,RGB(80,80,80),底,RGB(0,0,0));
STICKLINE(CURRBARSCOUNT=N/30,GD,DD,0,0),COLORGREEN;
STICKLINE(CURRBARSCOUNT=1,GD,DD,0,0),COLORGREEN;
STICKLINE(CURRBARSCOUNT<=N/30,支撑,支撑,4,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,强势,强势,4,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,突破,突破,4,0),COLORABABAB;
STICKLINE(CURRBARSCOUNT<=N/30,警示,警示,4,0),COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<=N/30,压力,压力,4,0),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=1,压力,'0.809'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=1,警示,'0.618'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=1,突破,'0.500'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=1,强势,'0.382'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=1,支撑,'0.191'),COLOR00FFFF;
{柱型显示}
STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF;
STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;
{蓝}
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLORFF7700;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.2,0),COLORFF9900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.5,0),COLORFFBB00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.5,0),COLORCYAN;
{红}
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;
{绿}
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,3,0),COLOR009900;
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,2.2,0),COLOR00BB00;
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,1.5,0),COLOR00DD00;
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,0.5,0),COLOR00FF00;
{灰}
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,3,0),COLOR999999;
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB;
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,1.5,0),COLORDDDDDD;
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,0.5,0),COLORFFFFFF;
STICKLINE(CROSS(JX,DX),OPEN,CLOSE,0.5,0),COLORYELLOW;
STICKLINE(CROSS(DX,JX),OPEN,CLOSE,0.5,0),{COLOR000099}COLORBLACK;
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);
大宗进:=(超B)+(大B),NODRAW;
大宗出:=(超S)+(大S),NODRAW;
非大宗进:=(中B)+(小B),NODRAW;
非大宗出:=(中S)+(小S),NODRAW;
大宗进限制:=IF((超B+大B)=0,0,大宗进);
大宗出限制:=IF((超S+大S)=0,0,大宗出);
非大宗进限制:=IF(中B+小B=0,0,非大宗进);
非大宗出限制:=IF(中S+小S=0,0,非大宗出);
主力净流入:=(超B+大B)-(超S+大S),COLORRED,NODRAW;
散户净流入:=(中B+小B)-(中S+小S),COLORRED,NODRAW;
净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S),COLORRED,NODRAW;
大单流入:=(超B+大B)/(超B+大B+超S+大S)*100,NODRAW;
大单流入限制:=IF((超B+大B+超S+大S)=0,0,大单流入);
大单流出比:=(超S+大S)/(超B+大B+超S+大S)*100,NODRAW;
大单流出限制:=IF((超B+大B+超S+大S)=0,0,大单流出比);
总流入比:=(超B+大B+中B+小B)/(超B+大B+中B+小B+超S+大S+中S+小S)*100,NODRAW;
总流出比:=(超S+大S+中S+小S)/(超B+大B+中B+小B+超S+大S+中S+小S)*100,NODRAW;
成交总量:=(超B+大B+中B+小B+超S+大S+中S+小S),NODRAW;
机构参与度:=(超B+超S+大B+大S)/成交总量*100,COLORYELLOW,NODRAW;
大单强度:=(超B+大B-超S-大S)/成交总量*100,COLORYELLOW,NODRAW;
大单强度限制:=IF(大单强度=0,-100,大单强度);
大单强度比:=IF(大单强度>=0,(大单强度限制+100)/2,100-ABS((大单强度限制-100)/2)),NODRAW;
超单强度:=(超B-超S)/(超B+超S)*100,COLORYELLOW,NODRAW;
超单强度限制:=IF(超单强度=0,-100,超单强度);
超单强度比:=IF(超单强度>0,(超单强度限制+100)/2,IF(超单强度<0,100-ABS((超单强度限制-100)/2),0)),NODRAW;
DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;
DRAWRECTREL(0,CONST(950-(ABS(大宗进)*250/DAZHIV))-20,30,950,IF(CONST(大宗进>0),RGB(2
[url=http://www.70822.com/soft/sort013/sort05/down-81916.html]通达信MACD趋势指标公式[/url]