高点:=50;

低点:=30;

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),COLORWHITE,NODRAW;

下跌幅:IF(CURRBARSCOUNT<=GT,C/SH*100-100,DRAWNULL),NODRAW,COLORGREEN;

下跌均价:IF(CURRBARSCOUNT<=GT,SUM(AMOUNT,GT)/SUM(V,GT)/100,DRAWNULL),NODRAW,COLORLIGRAY;

跌换手%:IF(CURRBARSCOUNT<=GT,SUM(HSL.HSL,GT),DRAWNULL),COLORCYAN,NODRAW;

上涨周期:IF(CURRBARSCOUNT<=DT,BARSLAST(DD=L),DRAWNULL),COLORWHITE,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),COLORLIMAGENTA,NODRAW;

星期:=VARCAT(VARCAT('(',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五','')))))),')');

日期:=VARCAT('-',VARCAT(VARCAT(VARCAT(VARCAT(VARCAT(VARCAT(VAR2STR(YEAR,0),'年'),VAR2STR(MONTH,0)),'月'),VAR2STR(DAY,0)),'日'),星期));

{自动黄金分割 普通等系坐标}

{DRAWRECTREL(990,982,382,982,RGB(250,250,0));}

DRAWTEXT_FIX(C>0,0.382,0.936,0,'要反转')COLOR00CCCC;

{DRAWRECTREL(990,232,382,232,RGB(100,100,0));}

{DRAWRECTREL(990,144.6,382,144.6,RGB(100,100,0));

DRAWRECTREL(990,750,382,750,RGB(100,100,0));

DRAWRECTREL(990,839,382,839,RGB(100,100,0));};