以下是大智慧macd多周期公式

大智慧MACD多周期公式

DIFF : EMA(CLOSE,SHORT) – EMA(CLOSE,LONG);
DEA : EMA(DIFF,M);
MACD : 2*(DIFF-DEA), COLORSTICK;

0,dotline,colorwhite;

N1:=last(MACD<0);{绿柱天数}
N2:=REF(last(MACD>0),N1);{绿柱前红柱天数}
N3:=REF(last(MACD<0),N2+N1);{红柱前绿柱天数}

MINMD0:=REF(LLV(MACD,N3+N2),N1);
MINDIFFF:=REF(LLV(DIFF,N3+N2),N1);
 

绿柱缩短:=MACD<0 AND MACD>REF(MACD,1) AND REF(MACD,1)<REF(MACD,2);
背离:绿柱缩短 and REF(MACD,1)>MINMD0 and LLV(L,N1)<REF(LLV(L,N2+N3),N1),PRECIS0,LINETHICK0;
双底背离:底背离 and MINDIFFF<DIFF,PRECIS0,LINETHICK0;

VERTLINE(底背离 ,1 ),colorblue;
VERTLINE(双底背离 ,1 ),colorred;
drawbmp(ref(macd,1)<0 and macd>0,diff,’STSbuy1.bmp’),align1,valign0;
drawbmp(ref(macd,1)>0 and macd<0,diff,’STSsell1.bmp’),align1,valign1;
 

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