主力获利比:WINNER(C)*100,NODRAW,COLORWHITE;
DRAWTEXT_FIX(主力获利比>=95 AND ISLASTBAR,0.97,0.97,0,'高危'),COLORRED;
DRAWTEXT_FIX(主力获利比>=80 AND 主力获利比<95 AND ISLASTBAR,0.97,0.97,0,'风险'),COLORYELLOW;
DRAWTEXT_FIX(主力获利比>=50 AND 主力获利比<80 AND ISLASTBAR,0.97,0.97,0,'安全'),COLORGREEN;
DRAWTEXT_FIX(主力获利比<50 AND ISLASTBAR,0.97,0.97,0,'空头'),COLORBLUE;
STICKLINE((CLOSE-REF(CLOSE,1))*100/REF(CLOSE,1)>=(10-0.01*100/REF(CLOSE,1)),O,C,3,0),COLOR0055FF;
STICKLINE((REF(CLOSE,1)-C)*100/REF(CLOSE,1)>=(10-0.01*100/REF(CLOSE,1)),O,C,3,0),COLOR00FF00;
DRAWTEXT_FIX(C>O,0,0.1,0,'量能黄线突破决策线为进场信号'),COLOR0000FF;
N:=10;
T1:=CONST(HHVBARS(VOL,N));
T0:IF(CURRBARSCOUNT<=N+3,CONST(IF(T1=0,C,REF(CLOSE,T1))),DRAWNULL),COLORFF00FF;
IF(CURRBARSCOUNT=T1+1,T0,DRAWNULL),CIRCLEDOT,COLORFF00FF;
DRAWTEXT(ISLASTBAR,T0,' 量能平台'),COLORCC00CC;
M:=10;
Q1:=CONST(REF(HHVBARS(VOL,M),T1+1)+T1+1);
Q0:IF(CURRBARSCOUNT<=T1+M+3 AND CURRBARSCOUNT>=T1+1,CONST(REF(CLOSE,Q1)),DRAWNULL),COLOR009900;
IF(CURRBARSCOUNT=Q1+1,Q0,DRAWNULL),CIRCLEDOT,COLOR00CC00;
M1:=CONST(LLVBARS(VOL,M));
M0:IF(CURRBARSCOUNT<=M+7,CONST(IF(M1=0,O,REF(OPEN,M1))),DRAWNULL);
IF(CURRBARSCOUNT=M1+1,M0,DRAWNULL),CIRCLEDOT;
DRAWTEXT(ISLASTBAR,M0,' 地量反量能平台');
HV:=HHV(VOL,8)=V OR V/REF(VOL,1)>=2;
FT:=BARSLAST(HV);
量能平台:IF(HV,C,REF(CLOSE,FT)),COLORYELLOW,LINETHICK2;
DP:=IF(C=INDEXC,0,1);
GJ:=AMOUNT/V/100;
【明日阻力】:L+(GJ-L)+(CLOSE-L),COLORRED,NODRAW;
【明日支撑】:L+(CLOSE-GJ),NODRAW;
年:=YEAR,NODRAW;
月:=MONTH,NODRAW;
星期:=WEEKDAY,NODRAW;
日1:=DATETODAY(DATE);
上市日:=REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT);
自然日:=日1-DATETODAY(上市日)+1;
ZB:=(自然日-REF(自然日,1))!=星期-REF(星期,1)
OR TOTALBARSCOUNT-CURRBARSCOUNT=0;
本周第几天:=BARSLAST(ZB)+1;
本月第几天:=BARSLAST(年*100+月!=REF(年*100+月,1))+1;
上周价格1:=REF(CLOSE,本周第几天);
上周价格2:=REF(上周价格1,本周第几天);
上周价格3:=REF(上周价格2,本周第几天);
上周价格4:=REF(上周价格3,本周第几天);
上周价格5:=REF(上周价格4,本周第几天);
上周价格6:=REF(上周价格5,本周第几天);
上周价格7:=REF(上周价格6,本周第几天);
上周价格8:=REF(上周价格7,本周第几天);
上周价格9:=REF(上周价格8,本周第几天);
十周价:=(CLOSE+上周价格1+上周价格2+上周价格3+上周价格4+上周价格5+上周价格6+上周价格7+上周价格8+上周价格9)/10;
决策:REFDATE(十周价,DATE),COLORFF00FF,LINETHICK2;
DRAWTEXT(ISLASTBAR,决策,' 决策线'),COLORYELLOW;