CC:ZIG(3,40); GT1:PEAKBARS(3,40,1),NODRAW; GT2:PEAKBARS(3,40,2),NODRAW; GT3:PEAKBARS(3,40,3),NODRAW; DT1:=TROUGHBARS(3,40,1); DT2:=TROUGHBARS(3,40,2); DT3:=TROUGHBARS(3,40,3); Z1:=(C-REF(C,DT1+1))/REF(C,DT1+1)*100; D1:=(C-REF(C,GT1+1))/REF(C,GT1+1)*100; H1:DRAWLINE(CURRBARSCOUNT=CONST(GT1)+1,C,ISLASTBAR,REF(C,CONST(GT1)),0),LINETHICK2,COLORGREEN; H2:DRAWLINE(CURRBARSCOUNT=CONST(GT2)+1,C,ISLASTBAR,REF(C,CONST(GT2)),0),LINETHICK2,COLORGREEN; H3:DRAWLINE(CURRBARSCOUNT=CONST(GT3)+1,C,ISLASTBAR,REF(C,CONST(GT3)),0),LINETHICK2,COLORGREEN; DRAWTEXT(CONST(GT1)<CONST(DT1) AND ISLASTBAR,L*0.95,VARCAT(VARCAT('跌:',VAR2STR((C-REF(C,GT1+1))/REF(C,GT1+1)*100,2)),'%'))COLORYELLOW; DRAWTEXT(CONST(GT1)>CONST(DT1) AND ISLASTBAR,L*0.95,VARCAT(VARCAT('漲:',VAR2STR((C-REF(C,DT1+1))/REF(C,DT1+1)*100,2)),'%'))COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=CONST(GT1)+1,H*1.02,VARCAT(VARCAT('漲:',VAR2STR(REF(Z1,BARSLAST(CURRBARSCOUNT=CONST(GT1)+1)),2)),'%'))COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=CONST(DT1)+1,L*0.95,VARCAT(VARCAT('跌:',VAR2STR(REF(D1,BARSLAST(CURRBARSCOUNT=CONST(DT1)+1)),2)),'%'))COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=CONST(GT2)+1,H*1.02,VARCAT(VARCAT('漲:',VAR2STR(REF(Z1,BARSLAST(CURRBARSCOUNT=CONST(GT2)+1)),2)),'%'))COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=CONST(DT2)+1,L*0.95,VARCAT(VARCAT('跌:',VAR2STR(REF(D1,BARSLAST(CURRBARSCOUNT=CONST(DT2)+1)),2)),'%'))COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=CONST(GT3)+1,H*1.02,VARCAT(VARCAT('漲:',VAR2STR(REF(Z1,BARSLAST(CURRBARSCOUNT=CONST(GT3)+1)),2)),'%'))COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=CONST(DT3)+1,L*0.95,VARCAT(VARCAT('跌:',VAR2STR(REF(D1,BARSLAST(CURRBARSCOUNT=CONST(DT3)+1)),2)),'%'))COLORYELLOW; |
|