天顶线:CONST(COST(99.999)),LINETHICK3;
中轴线:CONST(COST(50)),LINETHICK3;
地底线:CONST(COST(0.001)),LINETHICK3;
HHHH:=H=CONST(HHV(H,0));
LLLL:=L=CONST(LLV(L,0));
PP:=BARSLAST(HHHH)+1;
TT:=BARSLAST(LLLL)+1;
STICKLINE((PP=1),HHV(H,0),LLV(L,0),3,0),COLORBROWN;
STICKLINE((TT=1),HHV(H,0),LLV(L,0),3,0),COLORGRAY;
获利盘001%:=REFDATE(CONST(COST(0.001)),DATE),LINETHICK6,COLORYELLOW;
获利盘01%:=REFDATE(CONST(COST(0.01)),DATE),LINETHICK6,COLORYELLOW;
DRAWBAND(获利盘001%,RGB(250,150,250),获利盘01%,RGB(250,150,250));
获利盘49%:=REFDATE(CONST(COST(49)),DATE),LINETHICK6,COLORYELLOW;
获利盘51%:=REFDATE(CONST(COST(51)),DATE),LINETHICK6,COLORYELLOW;
DRAWBAND(获利盘49%,RGB(250,150,250),获利盘51%,RGB(250,150,250));
获利盘999:=REFDATE(CONST(COST(99.9)),DATE),LINETHICK6,COLORYELLOW;
获利盘9999:=REFDATE(CONST(COST(99.999)),DATE),LINETHICK6,COLORYELLOW;
DRAWBAND(获利盘999,RGB(250,150,250),获利盘9999,RGB(250,150,250));
高点:=REFDATE(CONST(REF(HHV(H,0),0)),DATE),DOTLINE;
低点:=REFDATE(CONST(REF(LLV(L,0),0)),DATE),DOTLINE;
GD:=CONST(FINDHIGH(H,0,高点*10,1));
DD:=CONST(FINDLOW(L,0,低点*10,1));
GT:=CONST(BARSLAST(GD=H))+1;
DT:=CONST(BARSLAST(DD=L))+1;
SH:=CONST(IF(GT=1,H,REF(H,GT-1)));
SL:=CONST(IF(DT=1,L,REF(L,DT-1)));
CC:=IF(DT>GT,DT,GT);
CD:=INTPART(CC-(DT+GT)/2);
CG:=IF(高点>CD,CD/2,高点);
下跌周期:BARSLAST(GD=H),COLORBROWN,NODRAW;
下跌幅度:IF(CURRBARSCOUNT<=GT,C/SH*100-100,DRAWNULL),NODRAW,COLORRED;
下跌均价:=IF(CURRBARSCOUNT<=GT,SUM(AMOUNT,GT)/SUM(V,GT)/100,DRAWNULL),NODRAW,COLORLIGRAY;
下跌换手:IF(CURRBARSCOUNT<=GT,SUM(HSL.HSL,GT),DRAWNULL),COLORGREEN,NODRAW;
上涨周期:IF(CURRBARSCOUNT<=DT,BARSLAST(DD=L),DRAWNULL),COLORBROWN,NODRAW;
上涨幅度:IF(CURRBARSCOUNT<=DT,C/SL*100-100,DRAWNULL),NODRAW,COLORRED;
上涨均价:=IF(CURRBARSCOUNT<=DT,SUM(AMOUNT,DT)/SUM(V,DT)/100,DRAWNULL),NODRAW,COLORLIGRAY;
上涨换手:IF(CURRBARSCOUNT<=DT,SUM(HSL.HSL,DT),DRAWNULL),COLORMAGENTA,NODRAW;
{回踩起点:=REFDATE(CONST(REF(HHV(H,0),0)),DATE)*1.0,DOTLINE;}
回踩起点:=REFDATE(CONST(COST(99.999)),DATE)*1.0,DOTLINE;
回踩10%:=回踩起点*0.90,DOTLINE;
回踩20%:=回踩10%*0.90,DOTLINE;
回踩30%:=回踩20%*0.90,DOTLINE;
回踩40%:=回踩30%*0.90,DOTLINE;
回踩50%:=回踩40%*0.90,DOTLINE;
回踩60%:=回踩50%*0.90,DOTLINE;
回踩70%:=回踩60%*0.90,DOTLINE;
回踩80%:=回踩70%*0.90,DOTLINE;
回踩90%:=回踩80%*0.90,DOTLINE;
回踩100%:=回踩90%*0.90,DOTLINE;
回踩110%:=回踩100%*0.90,DOTLINE;
回踩120%:=回踩110%*0.90,DOTLINE;
回踩130%:=回踩120%*0.90,DOTLINE;
回踩140%:=回踩130%*0.90,DOTLINE;
回踩150%:=回踩140%*0.90,DOTLINE;
回踩160%:=回踩150%*0.90,DOTLINE;
回踩170%:=回踩160%*0.90,DOTLINE;
回踩180%:=回踩170%*0.90,DOTLINE;
回踩190%:=回踩180%*0.90,DOTLINE;
回踩200%:=回踩190%*0.90,DOTLINE;
回踩210%:=回踩200%*0.90,DOTLINE;
回踩220%:=回踩210%*0.90,DOTLINE;
回踩230%:=回踩220%*0.90,DOTLINE;
回踩240%:=回踩230%*0.90,DOTLINE;
回踩250%:=回踩240%*0.90,DOTLINE;
回踩260%:=回踩250%*0.90,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=GT,回踩起点,'回踩起点'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩10%,'回踩10%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩20%,'回踩20%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩30%,'回踩30%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩40%,'回踩40%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩50%,'回踩50%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩60%,'回踩60%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩70%,'回踩70%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩80%,'回踩80%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩90%,'回踩90%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩100%,'回踩100%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩110%,'回踩110%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩120%,'回踩120%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩130%,'回踩130%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩140%,'回踩140%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩150%,'回踩150%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩160%,'回踩160%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩170%,'回踩170%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩180%,'回踩180%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩190%,'回踩190%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩200%,'回踩200%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩210%,'回踩210%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩220%,'回踩220%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩230%,'回踩230%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩240%,'回踩240%'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=GT,回踩250%,'回踩250%'),COLORYELLOW;
DRAWTEXT(YEAR!=REF(YEAR,1),HIGH+0.3,VARCAT(VAR2STR(YEAR,0),' 年 ')),COLORWHITE;
STICKLINE(YEAR!=REF(YEAR,1)=1,CONST(HHV(H,0)),CONST(LLV(L,0)),0,-1),COLORWHITE;
DRAWTEXT(MONTH!=REF(MONTH,1),LOW-0.2,VARCAT(VAR2STR(MONTH,0),' 月 ')),COLORWHITE;
STICKLINE(MONTH!=REF(MONTH,1)=1,CONST(HHV(H,0)),CONST(LLV(L,0)),0,-1),COLORWHITE;
DRAWTEXT(WEEKOFYEAR!=REF(WEEKOFYEAR,1),LOW,VARCAT(VAR2STR(WEEKOFYEAR,0),' 周 ')),COLORWHITE;
STICKLINE(WEEKOFYEAR!=REF(WEEKOFYEAR,1)=1,CONST(HHV(H,0)),CONST(LLV(L,0)),0,-1),COLORWHITE;
DRAWTEXT(DAY!=REF(DAY,1),LOW-0.2,VARCAT(VAR2STR(DAY,0),' 日 ')),COLORWHITE;
STICKLINE(DAY!=REF(DAY,1)=1,CONST(HHV(H,0)),CONST(LLV(L,0)),0,-1),COLORWHITE;
{画K线}
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
|