周末奉送,均线扣抵指标,免得自己数的麻烦。分同花顺版和通达信版
同花顺版:
参数:
STICKLINE(CURRBARSCOUNT==MA1-OFFSET,1,0,8,0),colorwhite;
DRAWTEXT(CURRBARSCOUNT==MA1-OFFSET,2*0.8,'5日');
STICKLINE(CURRBARSCOUNT==MA2-OFFSET,1,0,8,0),coloryellow;
DRAWTEXT(CURRBARSCOUNT==MA2-OFFSET,2*0.8,'10日');
STICKLINE(CURRBARSCOUNT==MA3-OFFSET,1,0,8,0),COLORa62aa2;
DRAWTEXT(CURRBARSCOUNT==MA3-OFFSET,2*0.8,'20日');
STICKLINE(CURRBARSCOUNT==MA4-OFFSET,1,0,8,0),colorgreen;
DRAWTEXT(CURRBARSCOUNT==MA4-OFFSET,2*0.8,'30日');
STICKLINE(CURRBARSCOUNT==MA5-OFFSET,1,0,8,0),colorliblue;
DRAWTEXT(CURRBARSCOUNT==MA5-OFFSET,2*0.8,'60日');
STICKLINE(CURRBARSCOUNT==MA6-OFFSET,1,0,8,0),COLOR70dbdb;
DRAWTEXT(CURRBARSCOUNT==MA6-OFFSET,2*0.8,'120日');
STICKLINE(CURRBARSCOUNT==MA7-OFFSET,1,0,8,0),colorred;
DRAWTEXT(CURRBARSCOUNT==MA7-OFFSET,2*0.8,'250日');
通达信版:
参数:
2,DOTLINE,COLORGREEN;
STICKLINE(CURRBARSCOUNT==M1-OFFSET,1,0,1.5,0),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT==M1-OFFSET,2*0.8,'5日');
STICKLINE(CURRBARSCOUNT==M2-OFFSET,1,0,1.5,0),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT==M2-OFFSET,2*0.8,'10日');
STICKLINE(CURRBARSCOUNT==M3-OFFSET,1,0,1.5,0),COLORA62AA2;
DRAWTEXT(CURRBARSCOUNT==M3-OFFSET,2*0.8,'20日');
STICKLINE(CURRBARSCOUNT==M4-OFFSET,1,0,1.5,0),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT==M4-OFFSET,2*0.8,'30日');
STICKLINE(CURRBARSCOUNT==M5-OFFSET,1,0,1.5,0),COLORLIBLUE;
DRAWTEXT(CURRBARSCOUNT==M5-OFFSET,2*0.8,'60日');
STICKLINE(CURRBARSCOUNT==M6-OFFSET,1,0,1.5,0),COLOR70DBDB;
DRAWTEXT(CURRBARSCOUNT==M6-OFFSET,2*0.8,'120日');
STICKLINE(CURRBARSCOUNT==M7-OFFSET,1,0,1.5,0),COLORRED;
DRAWTEXT(CURRBARSCOUNT==M7-OFFSET,2*0.8,'250日');
效果如下: