均价通道主图-精品通达信指标公式源码分享
参数P=2
STICKLINE(C>0,L,H,3,0),COLORBLACK;
A:=CURRBARSCOUNT;
A1:=DAY!=REF(DAY,1);
A2:=BARSLAST(A1)+1;
A3:=MA(C,A2);
A4:=SUM(AMO,A2)/SUM(VOL,A2)/100;
A5:=IF(CAPITAL>0,A4,A3);
价:IF(A<=CONST(A2),CLOSE,DRAWNULL)COLORWHITE,LINETHICK2;
均价:IF(A<=CONST(A2),A5,DRAWNULL),COLORYELLOW,LINETHICK2;
IF(C>均价,均价,DRAWNULL),COLORRED,LINETHICK2;
ZF:=DYNAINFO(13)*100;
上:均价*(1+0.01*ZF/2),COLORFFFF00;
下:均价/(1+0.01*ZF/2),COLOR00FF00;
上N:均价*(1+0.01*P),COLOR00FF00,LINETHICK2;
下N:均价/(1+0.01*P),COLORFFFF00,LINETHICK2;
DRAWICON(CROSS(C,上N),均价,5);
DRAWICON(CROSS(下N,C),均价,6);
DRAWTEXT(CROSS(C,均价),均价,'▲'),COLOR00FF00;
DRAWTEXT(CROSS(上,C),上,'★'),COLOR00FFFF;
DRAWTEXT(CROSS(C,下),下,'▲'),COLOR00FF00;
RC:=DYNAINFO(3);
S2:=EMA(C,12);
S6:=EMA(C,50);
DK:=(S2-S6);
STICKLINE(DK>0 AND DK>REF(DK,1),RC,RC+DK,2,0),COLORRED;
STICKLINE(DK>0 AND DK<=REF(DK,1),RC,RC+DK,2,1),COLORFF00FF;
STICKLINE(DK<0 AND DK>REF(DK,1),RC,RC+DK,2,0),COLORFFFF00;
STICKLINE(DK<0 AND DK<=REF(DK,1),RC,RC+DK,2,1),COLOR00FF00;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!