本文主要是介绍通达信自定义副图换手率指标 HSL_QD,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
LB:=VOL/((REF(VOL,1)+REF(VOL,2)+REF(VOL,3)+REF(VOL,4)+REF(VOL,5))/5);
DRAWBAND(25,RGB(0,0,0),IF((20+MA(LB,5)*5)<=40,20+MA(LB,5)*5,40),RGB(205,205,0));{量比均线}{DRAWBAND(0,RGB(66,66,66),10,RGB(66,66,66))};
{DRAWBAND(10,RGB(66,66,66),MA(IF((100*VOL/CAPITAL+3)<40,(100*VOL/CAPITAL+3),40),5),RGB(200,0,200))};NOTEXTH40:40,DOTLINE,COLORGRAY;HSL:IF(100*VOL/CAPITAL<40,100*VOL/CAPITAL,40),VOLSTICK,COLORRED,DRAWABOVE;
MH5:=MA(HSL,5);{换手率5日均线,上涨彩色区分}
NOTEXTM5:IF((MH5+3)<40,(MH5+3),40),COLORGRAY,LINETHICK2;{加常数3为将均线往上偏移,与柱形图拉开间距便于查看}
NOTEXTM5R:IF( (((MH5+3)>(REF(MH5,1)+3)) AND (MH5+3)<40) OR ((MH5+3)>40 AND (REF(MH5,1)+3)<40),IF((MH5+3)<40,MH5+3,40),DRAWNULL),COLORYELLOW,LINETHICK2;
{NOTEXTM5R:IF( (((MH5+3)>(REF(MH5,1)+3)) AND (MH5+3)<40) OR ((MH5+3)>40 AND (REF(MH5,1)+3)<40) OR BARSNEXT(((MH5+3)>(REF(MH5,1)+3)) AND (MH5+3)<40)=1,IF((MH5+3)<40,MH5+3,40),DRAWNULL),COLORYELLOW,LINETHICK4};{NOTEXTH3:3,DOTLINE,COLORBLUE};
NOTEXTH6:5,DOTLINE,COLORBLUE;
NOTEXTH10:10,DOTLINE,COLORMAGENTA;
{NOTEXTH15:15,DOTLINE,COLORBLUE};
NOTEXTH20:20,DOTLINE,COLORGRAY;
{NOTEXTH25:25,DOTLINE,COLORBLUE};
NOTEXTH30:30,DOTLINE,COLORGRAY;
NOTEXTH35:35,DOTLINE,COLORBLUE;{为方便多股同列一个副图指标使用,在顶部添加量比指标线,占两行,最高量比为5,一行为2.5}
LIANGBI:=IF(LB<=5,LB,5);
STICKLINE(CLOSE>=OPEN AND LIANGBI<3,40,(40-LIANGBI*5),0,0),COLORRED;
STICKLINE(CLOSE>=OPEN AND LIANGBI>=3 AND LIANGBI<4,40,(40-LIANGBI*5),1,0),COLORRED;
STICKLINE(CLOSE>=OPEN AND LIANGBI>=4,40,(40-LIANGBI*5),1,0),COLORMAGENTA;
STICKLINE(CLOSE<OPEN,40,(40-LIANGBI*5),0,0),COLORGRAY;
这篇关于通达信自定义副图换手率指标 HSL_QD的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!