带状公式-精品通达信指标公式源码分享
N:=20;
M:=60;
TG:=(MA(CLOSE,5)+MA(CLOSE,8)+MA(CLOSE,13)+MA(CLOSE,21))/4;
AA:=HHV(TG,3);
BB:=LLV(TG,3);
TG1:=(MA(CLOSE,2)+MA(CLOSE,3)+MA(CLOSE,4)+MA(CLOSE,5))/4;
AA1:=HHV(TG1,3);
AA2:=REF(AA1,1);
短期CMA最高值:AA1;
中期CMA:TG;
中期CMA最高值:AA;
中期CMA最低值:BB;
趋势线:MA(TG,N),COLORYELLOW;
QSX:=REF(趋势线,1);
DRAWBAND(趋势线,RGB(255,0,0),QSX,RGB(0,255,0));
STICKLINE(BB >趋势线 ,BB,趋势线,1,1),COLOR0000AA;
STICKLINE(BB <趋势线 ,BB,趋势线,1,1),COLOR008800;
STICKLINE(BB-REF(BB,1)>0 ,AA,BB,7,0),COLOR0000DD;
STICKLINE(BB-REF(BB,1)<0 ,BB,AA,7,0),COLOR008800;
AA12:=REF(AA,1);
BB1:=REF(BB,1);
DRAWBAND(AA,RGB(255,0,0),AA12,RGB(0,255,0));
DRAWBAND(BB,RGB(255,0,0),BB1,RGB(0,255,0));
STICKLINE((OPEN >= CLOSE),HIGH,LOW,0,0),COLORCYAN;
STICKLINE((OPEN >= CLOSE),OPEN,CLOSE,8,0),COLORCYAN;
STICKLINE((OPEN < CLOSE),HIGH,LOW,0,0),COLORRED;
STICKLINE((OPEN < CLOSE),OPEN,CLOSE,6,1),COLORRED,LINETHICK3;
STICKLINE((OPEN < CLOSE),OPEN,CLOSE,6,0),COLORYELLOW;
DRAWBAND(AA1,RGB(255,0,255),AA2,RGB(0,55,250));
趋势线1:=MA(TG,3),COLORYELLOW;
趋势线2:=REF(趋势线1,1);
DRAWBAND(趋势线1,RGB(255,255,0),趋势线2,RGB(0,55,255)),LINETHICK1;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!