面积MACD公式(一主公式二引用公式)[其他软件公式]
相关标签:
{面积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);
CXH3:=if(macd>0,HHV(abs(macd),bc),LLV(macd,bc));
CXH4:=(macd)/20;{图形比例缩小1/20,可修改}
CXH5:=SMACD*100;
drawnumber(ref(CXH4,1)>0 and CXH4<=0 ,ref(CXH3,1),ref(CXH5,1),0){,pxup100},COLORGREEN;{http://www.cxh99.com}
drawnumber(ref(CXH4,1)<0 and CXH4>=0 ,ref(CXH3,1),ref(abs(CXH5),1),0),{pxdn40,}colorff00ff;
drawnumber(islastbar and CXH4<0,ref(CXH3,1),abs(CXH5),0),align2,colorff00ff{,pxup40};
drawnumber(islastbar and CXH4>0,ref(CXH3,1),CXH5,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;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容