分时MACD(涨幅 振幅 成交额 半分位 均价)自用自编 带源码 也可为新手学习提供借鉴
明停:DYNAINFO(7)*1.1,COLORYELLOW,NODRAW;
昨收:DYNAINFO(3),COLORWHITE,NODRAW;
开盘:DYNAINFO(4),COLORLICYAN,NODRAW;
最高:DYNAINFO(5),COLORRED,NODRAW;
最低:DYNAINFO(6),COLORGREEN,NODRAW;
半分:(最高+最低)/2,COLORMAGENTA,NODRAW;
涨幅:DYNAINFO(14)*100,COLORRED,NODRAW;
振幅:DYNAINFO(13)*100,COLORGREEN,NODRAW;
总金額:DYNAINFO(10)/100000000,COLORLIMAGENTA,NODRAW;
分时均价:DYNAINFO(11),COLORYELLOW,NODRAW;
信号:=1;
DIFF:EMA(CLOSE,11)-EMA(CLOSE,24),COLORBLUE;
DEA:EMA(DIFF,9),COLORWHITE;
MACD:=(DIFF-DEA)*2,COLORSTICK;
{分析家公式网 }
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,1,0),COLORRED;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,1,0),COLORWHITE;
STICKLINE(MACD<REF(MACD,1) AND REF(MACD,1)>REF(MACD,2) AND MACD>0,MACD,0,1,0),COLORLIGREEN;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,1,0),COLORFF9900;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,1,0),COLORBROWN;
STICKLINE(MACD>REF(MACD,1) AND REF(MACD,1)<REF(MACD,2) AND MACD<=0,MACD,0,2,0),COLORYELLOW;
STICKLINE(CROSS(DIFF,DEA),0,DEA,1,0),COLORLIMAGENTA;
STICKLINE(CROSS(DEA,DIFF),0,DIFF,1,0),COLORBLUE;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0))*信号;
二次金叉:=(CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1)*信号;
STICKLINE(二次金叉,0,MACD,0.1,0)*信号,COLORGREEN;
DRAWTEXT(二次金叉,DEA,' 二次金叉')*信号,COLORYELLOW;
DRAWICON(二次金叉,MACD,1)*信号;
IF(DIFF<0,DIFF,DRAWNULL),COLORBLUE,LINETHICK3;
IF(DEA>0,DEA,DRAWNULL),COLORCYAN,LINETHICK3;
IF(DEA<0,DEA,DRAWNULL),COLORWHITE,LINETHICK3;
IF(DIFF>DEA,DIFF,DRAWNULL),COLORRED,LINETHICK3;
IF(DEA<DIFF,DEA,DRAWNULL),COLORMAGENTA,LINETHICK3;
IF(DIFF>0,DIFF,DRAWNULL),COLORYELLOW,LINETHICK3;
0,LINETHICK3,COLORWHITE;
分水岭:0.07,LINETHICK2,COLORGREEN;
p202031228272270.jpg
|