本指标用到MD动向平均函数,K线说明,本指标含有三组K线,红色空心及青色实心K线为实际K线,另外二组K线,一组是在O,H,L,C的基础上加WMA(H,N),绘有五色,即橙红色,黄色,深绿色,蓝色和白色;还有一组是O,H,L,C加WMA(L,N),绘有二色K线,即晶红色和浅青色.主要关注三组K线在不同高低位置的关系,也许你能从中看出点门道
源码
N:=5;M:=20;
KLINE(O,H,L,C,0);
xo:=(o+wma(h,n))*0.5;
xh:=(h+wma(h,n))*0.5;
xl:=(l+wma(h,n))*0.5;
xc:=(c+wma(h,n))*0.5;
STICKLINE(XC>Xo AND C>XC,Xo,XC,6,0),COLOR0077FF;
STICKLINE(XC>Xo AND C>XC,Xh,Xl,0,0),COLOR0077FF;
STICKLINE(XC>Xo AND C<XC,Xo,XC,6,0),COLORYELLOW;
STICKLINE(XC>Xo AND C<XC,Xh,Xl,0,0),COLORYELLOW;
STICKLINE(XC<Xo,Xo,XC,6,0),COLOR00bb00;
STICKLINE(XC<Xo ,Xh,Xl,0,0),COLOR00bb00;
STICKLINE(XC<Xo AND C>XC,Xo,XC,6,0),COLORBLUE;
STICKLINE(XC<Xo AND C>XC,Xh,Xl,0,0),COLORBLUE;
Lo:=(o+wma(L,n))*0.5;
Lh:=(h+wma(L,n))*0.5;
Ll:=(l+wma(L,n))*0.5;
Lc:=(c+wma(L,n))*0.5;
STICKLINE(LC>Lo ,Lo,LC,3,0),COLORMAGENTA;
STICKLINE(LC>Lo ,Lh,Ll,0,0),COLORMAGENTA;
STICKLINE(LC<Lo ,Lo,LC,3,0),COLORAAAA00;
STICKLINE(LC<Lo ,Lh,Ll,0,0),COLORAAAA00;
SKX:=(o+C+h+L)/4;
GKX:=(xo+XC+xh+XL)/4;
动向线:if(INDEXC=c,MD(SKX,M),MD(AMOUNT/(V*100),M));
评论(0)