成功将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;
- 上一篇公式:BOLL宝塔综合副图(副图 贴图 指标)
- 下一篇公式:母子线主图源码,贴图说明