软件名称:[B]面积MACD公式(一主公式二引用公式)[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/
软件语言:简体中文
授权方式:免费版
软件大小:4.00 KB
官方主页:Home Page
更新时间:2010-03-08 14:51:06
软件简介:
{面积MACD公式}注:调整参数可以自行更改,主要作用是放大或缩小MACD面积倍数,效果是一样的。
input.:调整参数(20,0.0001,1000);
p:=26;s:=12;m:=9;
DIFF:EMA(c,s) - EMA(c,p);
DEA:EMA(DIFF,m);
MACD:2*(DIFF-DEA),COLORSTICK;
BV:=SUM(MACD/调整参数,0);
BA:=IF(MAX(BV,REF(BV,2))<REF(BV,1) OR MIN(BV,REF(BV,2))>REF(BV,1),1,0);
BC:=BARSLAST(BA)+1;
SMACD:=BV-REF(BV,BC);
var3:=if(macd>0,HHV(abs(macd),bc),LLV(macd,bc));
var4:=(macd)/20;{图形比例缩小1/20,可修改}
var5:=SMACD*100;
drawnumber(ref(var4,1)>0 and var4<=0 ,ref(var3,1),ref(var5,1),0){,pxup100},colorgreen;
drawnumber(ref(var4,1)<0 and var4>=0 ,ref(var3,1),ref(abs(var5),1),0),{pxdn40,}colorff00ff;
drawnumber(islastbar and var4<0,ref(var3,1),abs(var5),0),align2,colorff00ff{,pxup40};
drawnumber(islastbar and var4>0,ref(var3,1),var5,0),align2,colorgreen{,pxdn100};
M1:=REF(MACD,1);
STICKLINE(macd>0 and macd<=m1,0,macd,3,0),coloryellow;
STICKLINE(macd<0 and macd>=m1,0,macd,3,0),colorwhite;
{DRAWICON(macd<0 and ref(macd,1)>macd and l>ref(l,1) and c>o,macd,10);}
{DRAWICON(ref(macd,2)>0 and ref(macd,1)<0.01 and macd>0.01,macd,10);}
{DRAWICON(diff>ref(diff,1) and macd<0 and c>=o and l<ref(l,1),macd,12);}
{DRAWICON(macd<0 and ref(macd,1)<macd and l<ref(l,1) and c>o,macd,10);}
日线MACD:"macd.macd#day",LINETHICK0,COLORFF0099;
三十分MACD:"MACD.MACD#MIN30",colorred,linethick0;
十五分MACD:"MACD.MACD#MIN15",linethick0;
五分MACD:"MACD.MACD#MIN5",colorff00ff,linethick0;
jc := dea-diff;
绿柱面积:IF (MACD<0,SUM(MACD,BARSLAST(jc<0)),0),linethick0,colorblue;
红柱面积:IF (MACD>0,SUM(MACD,BARSLAST(jc>0)),0),linethick0,colorred;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
e:=CROSS(83,RSI);
DRAWICON(e,macd,10);
日RSI:"引用RSI.RSI#day",colorff00ff,linethick0;
六十分RSI:"引用RSI.RSI#MIN60",colorff00ff,linethick0;
三十分RSI:"引用RSI.RSI#MIN30",colorff00ff,linethick0;
十五分RSI:"引用RSI.RSI#MIN15",colorff00ff,linethick0;
五分RSI:"引用RSI.RSI#MIN5",colorff00ff,linethick0;
DRAWICON(CROSS(83,日RSI),macd,1);
STICKLINE(CROSS(83,日RSI),diff,0,6,0),Colorred;
DRAWICON(CROSS(83,六十分RSI),macd,2);
DRAWICON(CROSS(83,三十分RSI),diff,3);
DRAWICON(CROSS(83,十五分RSI),-macd,4);
DRAWICON(CROSS(83,五分RSI),macd,6);
日WR:"引用WR.WR#day",colorff00ff,linethick0;
六十分WR:"引用WR.WR#MIN60",colorff00ff,linethick0;
三十分WR:"引用WR.WR#MIN30",colorff00ff,linethick0;
十五分WR:"引用WR.WR#MIN15",colorff00ff,linethick0;
五分WR:"引用WR.WR#MIN5",colorff00ff,linethick0;
PARTLINE(日WR<=1,diff),colorred,LINETHICK5;
PARTLINE(六十分wr<=1,dea),colorgreen,LINETHICK4;
PARTLINE(三十分wr<=1,diff),colorff00ff,LINETHICK3;
PARTLINE(十五分wr<=1,dea),colorgreen,LINETHICK2;
DRAWICON(五分wr<=1,macd,12);
下面二个是面积公式引用的公式,公式名一定要对。
1、公式名称{引用RSI}
LC:=REF(CLOSE,1);
RSI:SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100,linethick0;
e:CROSS(83,RSI);
2、公式名称{引用WR}
WR:(C-llv(L,5))/(hhv(H,5)-llv(L,5))*100;
[url=http://www.70822.com/soft/sort013/sort02/down-17024.html]面积MACD公式(一主公式二引用公式)[/url]