DRAWTEXT_FIX(1,0.01,0.01,0,’1、在日线观察周macd,与它在周线的样子是一样的’),COLORWHITE;
DRAWTEXT_FIX(1,0.01,0.06,0,’2、在日线分析周MacD时,注意对应的最右边一根k线是最近的这周’),COLORWHITE;
DRAWTEXT_FIX(1,0.01,0.11,0,’3、相应的,往左数第二根K线对应上周,接着是上上周…’),COLORWHITE;
DRAWTEXT_FIX(1,0.01,0.16,0,’4、周线MACD的具体数值看上方,这才是是正确的’),COLORWHITE;
{MACD}
DDATE:DATE,NODRAW,COLORRED;
DIF:EMA(C,12)-EMA(C,26),COLORWHITE;
DEA:EMA(DIF,9),COLORYELLOW;
MACD:(DIF-DEA)*2,NODRAW,COLORMAGENTA;
{显示MACD柱}
STICKLINE(MACD>0,MACD,0,1,1),COLORRED;
STICKLINE(MACD<0,0,MACD,1,1),COLORGREEN;
TESTSKIP(PERIOD!=5);
{周MACD}
D1:=DATE;
DIF1:=MACD.DIF#WEEK;
DEA1:=MACD.DEA#WEEK;
WEK:=REFX(WEEkdAY<REF(WEEKDAY,1) OR
DATETODAY(DATE)-DATETODAY(REF(DATE,1))>=7,1) OR ISLASTBAR;
D2:=IF(WEK,D1,DRAWNULL);
DIF2:=IF(WEK,DIF1,DRAWNULL);
DEA2:=IF(WEK,DEA1,DRAWNULL);
周日期:ALIGNRIGHT(D2),NODRAW,COLORRED;
周DIF:ALIGNRIGHT(DIF2),NODRAW,COLORWHITE;
周DEA:ALIGNRIGHT(DEA2),NODRAW,COLORYELLOW;
周MACD:(周DIF-周DEA)*2,NODRAW,COLORMAGENTA;
A1:=CONST(LLV(MACD,150))*2;
Q:=0.6;
NOTEXTA1:A1,COLOR336699,DOTLINE;
{显示周MACD柱}
STICKLINE(周MACD>0,A1,周MACD*Q+A1,1,1),COLOR0099FF;
STICKLINE(周MACD<0,A1,周MACD*Q+A1,1,1),COLOR999900;
{显示周MACD均线}
NOTEXT周DIF:周DIF*Q+A1,DOTLINE,COLORLIRED;
NOTEXT周DEA:周DEA*Q+A1,DOTLINE,COLORCYAN;
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)