【股价预测】--- 不错的画线指标
{【股价预测】}
{-----------------------☆功能开关------------------------}
{角度}
最初:=SYSPARAM(2); 最后:=SYSPARAM(3); 最高:=SYSPARAM(4); 最低:=SYSPARAM(5);
X_1:=最后-最初; X_2:=HHVBARS(H,X_1+1); X_3:=LLVBARS(L,X_1+1); X_4:=BARPOS=(最后-X_3[最后]); X_5:=(最高-最低)/(最后-最初);
{分割}
L_1:=BACKSET(ISLASTBAR,(LLVBARS(L,55)+1)); L_2:=L_1>REF(L_1,1); L_3:=REF(L,BARSLAST(L_2));
y1:=L_3*1.191; y2:=L_3*1.382; y3:=L_3*1.5; y4:=L_3*1.618; y5:=L_3*1.809; y6:=L_3*2;
{-----------------【图解模板】---------------------}
{斜射线}
DRAWSL(X_4,L,X_5*9,0,0),LINEDASH,ColorFFC500;
DRAWSL(X_4,L,X_5*5,0,0),LINEDASH,Color00FFFF;
DRAWSL(X_4,L,X_5*3,0,0),LINEDASH,Color00BEBC;
DRAWSL(X_4,L,X_5*2,0,0),LINEDASH,Color00BEFF;
DRAWSL(X_4,L,X_5*1.5,0,0),LINEDASH,ColorFF44FF;
DRAWSL(X_4,L,X_5,0,0),LINEDASH,Color00F600;
DRAWSL(X_4,L,X_5*0.5,0,0),LINEDASH,ColorFFA9FF;
DRAWSL(X_4,L,X_5*0.16,0,0),LINEDASH,ColorFFD3FF;
PARTLINE(L_3,L_3),LINETHICK2,COLORRED;
VERTLINE(L_2),LINETHICK2,Color0000FF;
射值2:LINEVALUE(X_4,L,BARPOS=最后,ref(l,X_3)+X_3*X_5*5,0,0),PRECISION2,LINETHICK,Color00FFFF;
射值3:LINEVALUE(X_4,L,BARPOS=最后,ref(l,X_3)+X_3*X_5*3,0,0),PRECISION2,LINETHICK,Color00BEFF;
射值4:LINEVALUE(X_4,L,BARPOS=最后,ref(l,X_3)+X_3*X_5*2,0,0),PRECISION2,LINETHICK,Color00BEBC;
射值5:LINEVALUE(X_4,L,BARPOS=最后,ref(l,X_3)+X_3*X_5*1.5,0,0),PRECISION2,LINETHICK,ColorFF44FF;
射值6:LINEVALUE(X_4,L,BARPOS=最后,ref(l,X_3)+X_3*X_5,0,0),PRECISION2,LINETHICK,Color00F600;
射值7:LINEVALUE(X_4,L,BARPOS=最后,ref(l,X_3)+X_3*X_5*0.5,0,0),PRECISION2,LINETHICK,ColorFFA9FF;
射值8:LINEVALUE(X_4,L,BARPOS=最后,ref(l,X_3)+X_3*X_5*0.16,0,0),PRECISION2,LINETHICK,ColorFFD3FF;
{分割}
PARTLINE(C,y1),Color0089FF;
PARTLINE(C,y2),ColorFF7FFF;
PARTLINE(C,y3),COLORGREEN;
PARTLINE(C,y4),COLORYELLOW;
PARTLINE(C,y5),COLORCYAN;
PARTLINE(C,y6),ColorFF8900;
DRAWTEXT(L_2,y1,'曙光初显 '),ALIGN2,PXUP8,Color0089FF;
DRAWTEXT(L_2,y2,'柔情荡漾 '),ALIGN2,PXUP8,ColorFF7FFF;
DRAWTEXT(L_2,y3,'弥漫春色 '),ALIGN2,PXUP8,COLORGREEN;
DRAWTEXT(L_2,y4,'狰狞初显 '),ALIGN2,PXUP8,COLORYELLOW;
DRAWTEXT(L_2,y5,'险峰风光 '),ALIGN2,PXUP8,COLORCYAN;
DRAWTEXT(L_2,y6,'舔血刀口 '),ALIGN2,PXUP8,ColorFF8900;
DRAWTEXT(L_2,L_3,'起动点 '),ALIGN2,ALIGN2,COLORRED;
DRAWTEXT(ISLASTBAR,y1,NUMTOSTR(y1,2)),SHIFT1,PXUP8,Color0089FF;
DRAWTEXT(ISLASTBAR,y2,NUMTOSTR(y2,2)),SHIFT1,PXUP8,ColorFF7FFF;
DRAWTEXT(ISLASTBAR,y3,NUMTOSTR(y3,2)),SHIFT1,PXUP8,COLORGREEN;
DRAWTEXT(ISLASTBAR,y4,NUMTOSTR(y4,2)),SHIFT1,PXUP8,COLORYELLOW;
DRAWTEXT(ISLASTBAR,y5,NUMTOSTR(y5,2)),SHIFT1,PXUP8,COLORCYAN;
DRAWTEXT(ISLASTBAR,y6,NUMTOSTR(y6,2)),SHIFT1,PXUP8,ColorFF8900;
// |