以下是大智慧很实用MACD公式

大智慧很实用MACD公式

很实用MACD

MACD改

SQX:=(C-MA(CLOSE,13));
DIFF:EMA(MA(sqx,7),1),COLOR00ffff;
DEA:EMA(diff,7),COLORff33ff;
MACD:(diff-dea)*2,COLORSTICK;
DIFF1:=”MACD.DIFF#MIN1″;DEA1:=”MACD.DEA#MIN1″;MACD1:=”MACD.MACD#MIN1″;
DIFF5:=”MACD.DIFF#MIN5″;DEA5:=”MACD.DEA#MIN5″;MACD5:=”MACD.MACD#MIN5″;
DIFF15:=”MACD.DIFF#MIN15″;DEA15:=”MACD.DEA#MIN15″;MACD15:=”MACD.MACD#MIN15″;
DIFF30:=”MACD.DIFF#MIN30″;DEA30:=”MACD.DEA#MIN30″;MACD30:=”MACD.MACD#MIN30″;
DIFF60:=”MACD.DIFF#MIN60″;DEA60:=”MACD.DEA#MIN60″;MACD60:=”MACD.MACD#MIN60″;
DIFF_DAY:=”MACD.DIFF#DAY”;DEA_DAY:=”MACD.DEA#DAY”;MACD_DAY:=”MACD.MACD#DAY”;
DIFF_WEEK:=”MACD.DIFF#WEEK”;DEA_WEEK:=”MACD.DEA#WEEK”;MACD_WEEK:=”MACD.MACD#WEEK”;
DIFF_X:=IF(DATATYPE=10,DIFF_WEEK,
if(DATATYPE=9,DIFF_DAY,
if(DATATYPE=8,DIFF60,
if(DATATYPE=7,DIFF30,
if(DATATYPE=6,DIFF15,
if(DATATYPE=5,DIFF5,
if(DATATYPE=4,DIFF1,DIFF)))))));
DEA_X:=IF(DATATYPE=10,DEA_WEEK,
if(DATATYPE=9,DEA_DAY,
if(DATATYPE=8,DEA60,
if(DATATYPE=7,DEA30,
if(DATATYPE=6,DEA15,
if(DATATYPE=5,DEA5,
if(DATATYPE=4,DEA1,DEA)))))));
MACD_X:=IF(DATATYPE=10,MACD_WEEK,
if(DATATYPE=9,MACD_DAY,
if(DATATYPE=8,MACD60,
if(DATATYPE=7,MACD30,
if(DATATYPE=6,MACD15,
if(DATATYPE=5,MACD5,
if(DATATYPE=4,MACD1,MACD)))))));
FILLRGN(DIFF_X,DEA_X,MACD_X<REF(MACD_X,1) AND MACD_X>0,RGB(255,255,0),
MACD_X>REF(MACD_X,1) AND MACD_X<0,RGB(255,0,0),
DIFF_X>DEA_X,RGB(136,68,68),DIFF_X<DEA_X,RGB(119,188,188));
PARTLINE(DIFF,DIFF>REF(DIFF,1),RGB(255,0,0),DIFF<REF(DIFF,1),RGB(0,255,0),1,RGB(0,0,255));
PARTLINE(DEA,DEA>REF(DEA,1),RGB(255,0,0),DEA<REF(DEA,1),RGB(0,255,0),1,RGB(0,0,255));

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。