以下是成功将macd融入分时主图

成功将macd融入分时主图

看到有网友将macd融入主图,创意不错,但看了源码发现是高度相似的macd,感觉不是太理想。其实macd想原版融入主图,让macd是图形一点不走样,内核不变,这是纯数学的问题。我试着做了一个,大家比对一下。源码公开。没啥秘密,就是纯数学问题。都是些花花,看盘也用处不大,各人有各人的看盘习惯用主图,这类东西就是玩玩。路过的可以吐槽。也可提思路美化。

macd融入主图

A5:CONST((HHV(C,120)+LLV(C,120))/2),DOTLINE,COLORWHITE;
 A1:3*(EMA(CLOSE,12)-EMA(CLOSE,26))+A5,COLORWHITE;
 A2:EMA(A1,9),COLORYELLOW;
 MACD:=(A1-A2)*2+A5;
 DRAWKLINE(H,O,L,C);
 STICKLINE(A1>=A2,A5,MACD ,0,-1),COLORLIRED;
 STICKLINE(A1<A2,A5,MACD ,0,-1),COLORCYAN;
 

 

{分时MACD}
ZRS:=CONST(DYNAINFO(3)),NODRAW;
A1:3.5*(EMA(CLOSE,12)-EMA(CLOSE,26))+ZRS,COLORLIMAGENTA;
A2:EMA(A1,9),COLORLIBLUE;
MACD:=(A1-A2)*2+ZRS;
DRAWKLINE(H,O,L,C);
STICKLINE(A1>=A2,ZRS,MACD ,0,1),COLORRED;
STICKLINE(A1<A2,ZRS,MACD ,0,1),COLORCYAN;
C,COLORWHITE,LINETHICK2;
均价:SUM(V*C,0)/SUM(V,0),COLORGREEN,LINETHICK1;
IF(均价<=REF(均价,1),均价,DRAWNULL),COLORGREEN,LINETHICK3;
IF(均价>=REF(均价,1),均价,DRAWNULL),COLORYELLOW,LINETHICK3;
DRAWTEXT(CURRBARSCOUNT=4,均价,’均’),COLORYELLOW,LINETHICK3;
DRAWNUMBER(CURRBARSCOUNT=2,均价,均价),COLORYELLOW,LINETHICK3;
DRAWTEXT_FIX(1,0.000,1-0.05,0,DYBLOCK),COLORWHITE;
DRAWTEXT_FIX(1,0.0550,1-0.05,0,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(1,0.1050,1-0.05,0,GNBLOCK),COLORYELLOW; 

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