日:=120; 昨前:=3;

高1:=REF(HHV(H,日),昨前);

低1:=REF(LLV(L,日),昨前);

H1:=高1-(高1-低1)*0.191;

H2:=高1-(高1-低1)*0.382;

H3:=高1-(高1-低1)*0.5;

H4:=高1-(高1-低1)*0.618;

H5:=高1-(高1-低1)*0.809;

HIGH1:=REFDATE(高1,DATE),COLORRED,LINETHICK3;

HIGH2:=REFDATE(H1,DATE),COLORYELLOW,LINETHICK3;

LOW2:REFDATE(H5,DATE),COLORYELLOW,LINETHICK3;

LOW1:REFDATE(低1,DATE),COLORGREEN,LINETHICK3;

N:=240;

TS:=BARSLAST(L=LLV(L,N));

开始信号:=FILTERX(TS=0,BARSSINCE(C));

开始天数:=BARSLAST(开始信号);

天数横线:=CONST(开始天数);

低点:=DRAWLINE(L=LLV(L,N),L,ISLASTBAR,REF(L,TS),1),COLORGRAY;

高点:=DRAWLINE(L=LLV(L,N),CONST(HHV(H,天数横线)),ISLASTBAR,REF(CONST(HHV(H,天数横线)),

TS),1),COLORGRAY;

STICKLINE(开始信号,L,CONST(HHV(H,天数横线)),0,0),COLORGRAY;

STICKLINE(ISLASTBAR,低点,高点,0,0),COLORGRAY;

DRAWKLINE(HIGH,OPEN,LOW,CLOSE);

C2:=REF(C,1),NODRAW;

差:=(高点-低点)/天数横线;

收盘差:=CONST(C)-低点;

对角差:=高点-低点;

对角角度:ATAN((对角差/(对角差*((天数横线-1)/天数横线))-1)*100)*57.3,COLORFF00FF,NODRAW;

差30度:=(高点-低点)*30/对角角度;

差60度:=(高点-低点)*60/对角角度;

差45度:=(高点-低点)*45/对角角度;

差55度:=(高点-低点)*55/对角角度;

差50度:=(高点-低点)*50/对角角度;

差65度:=(高点-低点)*65/对角角度;

角度65:=IF(TS>=0 AND 低点+(差65度/天数横线)*TS<=高点,低点+(差65度/天数横线)*TS,DRAWNULL),COLORLIBLUE,DOTLINE;

角度50:=IF(TS>=0 AND 低点+(差50度/天数横线)*TS<=高点,低点+(差50度/天数横线)*TS,DRAWNULL),COLORLIBLUE,DOTLINE;

角度55:=IF(TS>=0 AND 低点+(差55度/天数横线)*TS<=高点,低点+(差55度/天数横线)*TS,DRAWNULL),COLORLIBLUE,DOTLINE;

对角线:IF(TS>=0 AND TIME<=0933 AND O<H1 AND 低点+差*TS<=高点,低点+差*TS,DRAWNULL),COLORYELLOW,LINETHICK9;

{DRAWBAND(对角线,RGB(255,0,255),对角线,RGB(255,0,255)),LINETHICK2;}

角度60:=IF(TS>=0 AND 低点+(差60度/天数横线)*TS<=高点,低点+(差60度/天数横线)*TS,DRAWNULL),COLORLIBLUE,DOTLINE;

角度45:=IF(TS>=0 AND 低点+(差45度/天数横线)*TS<=高点,低点+(差45度/天数横线)*TS,DRAWNULL),COLORGREEN;

角度30:=IF(TS>=0 AND 低点+(差30度/天数横线)*TS<=高点,低点+(差30度/天数横线)*TS,DRAWNULL),COLORRED;

收盘角度:=(收盘差*对角角度)/对角差,NODRAW;

收盘线:=IF(TS>=0 AND 低点+(收盘差/天数横线)*TS<=高点,低点+(收盘差/天数横线)*TS,DRAWNULL);

{DRAWBAND(收盘线,RGB(192,192,192),收盘线,RGB(192,192,192)),DOTLINE,COLORC0C0C0;};

{}

AA:=对角线<=LOW1;

STICKLINE((AA) ,L,L*9,700,0)COLORYELLOW;

LC:=REF(CLOSE,1);

WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;

WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;

活跃:=(WRSI-WR10);

活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2))>=99;

DRAWTEXT_FIX(1,0.50,0.25,1,STRCAT(STRCAT('活跃:',CON2STR(活跃度比,2)),'%')),COLORMAGENTA;

STICKLINE((活跃度比)AND TIME<=0932,L,L*9,100,0),COLORMAGENTA;