输入参数:(可修改)
fx :(选择开关 0:双向延伸,1:向左延伸 2:向右延伸)
n:延伸周期(最好不超过20)
cond:条件
price:显示位置
{参数设定}
fx:=1;
n:=15;
cond:=(c/ref(c,1)-1)*100>5;
price:=h;
b1:=barslast(cond),linethick0;
b2:=sumbars(cond,2)-1;
b3:=sumbars(cond,3)-1;
b4:=sumbars(cond,4)-1;
b5:=sumbars(cond,5)-1;
{左右延伸}
stickline(fx<=1 and cond,price,price,n*10,0),colordddddd;
{向左延伸}
{STICKLINE(fx=1 and cond,price,price,n*10,0),COLORDDDDDD;}
STICKLINE(fx=1 and ref(cond,n)=1,ref(price,n),ref(price,n),n*10,0),COLOR000000;
STICKLINE(fx=1 and b1>=1 and b1<=n,ref(price,b1),ref(price,b1),b1*10,0),COLOR000000;
STICKLINE(fx=1 and b2>=1 and b2<=n,ref(price,b2),ref(price,b2),b2*10,0),COLOR000000;
STICKLINE(fx=1 and b3>=1 and b3<=n,ref(price,b3),ref(price,b3),b3*10,0),COLOR000000;
STICKLINE(fx=1 and b4>=1 and b4<=n,ref(price,b4),ref(price,b4),b4*10,0),COLOR000000;
STICKLINE(fx=1 and b5>=1 and b5<=n,ref(price,b5),ref(price,b5),b5*10,0),COLOR000000;
{向右延伸}
stickline(fx=2 and b1>0 and b1<n,ref(price,b1),ref(price,b1),10,0),colordddddd;
STICKLINE(fx=2 and b2>0 and b2<n,ref(price,b2),ref(price,b2),10,0),COLORdddddd;
STICKLINE(fx=2 and b3>0 and b3<n,ref(price,b3),ref(price,b3),10,0),COLORdddddd;
STICKLINE(fx=2 and b4>0 and b4<n,ref(price,b4),ref(price,b4),10,0),COLORdddddd;
STICKLINE(fx=2 and b5>0 and b5<n,ref(price,b5),ref(price,b5),10,0),COLORdddddd;
{画K线}
stickline(c>=o,h,l,0,0),colorred;
stickline(c>=o,c,o,5,1),colorred;
stickline(c<o,h,l,0,0),colorffff00;
stickline(c<o,c,o,5,0),colorffff00;



fx :(选择开关 0:双向延伸,1:向左延伸 2:向右延伸)
n:延伸周期(最好不超过20)
cond:条件
price:显示位置
{参数设定}
fx:=1;
n:=15;
cond:=(c/ref(c,1)-1)*100>5;
price:=h;
b1:=barslast(cond),linethick0;
b2:=sumbars(cond,2)-1;
b3:=sumbars(cond,3)-1;
b4:=sumbars(cond,4)-1;
b5:=sumbars(cond,5)-1;
{左右延伸}
stickline(fx<=1 and cond,price,price,n*10,0),colordddddd;
{向左延伸}
{STICKLINE(fx=1 and cond,price,price,n*10,0),COLORDDDDDD;}
STICKLINE(fx=1 and ref(cond,n)=1,ref(price,n),ref(price,n),n*10,0),COLOR000000;
STICKLINE(fx=1 and b1>=1 and b1<=n,ref(price,b1),ref(price,b1),b1*10,0),COLOR000000;
STICKLINE(fx=1 and b2>=1 and b2<=n,ref(price,b2),ref(price,b2),b2*10,0),COLOR000000;
STICKLINE(fx=1 and b3>=1 and b3<=n,ref(price,b3),ref(price,b3),b3*10,0),COLOR000000;
STICKLINE(fx=1 and b4>=1 and b4<=n,ref(price,b4),ref(price,b4),b4*10,0),COLOR000000;
STICKLINE(fx=1 and b5>=1 and b5<=n,ref(price,b5),ref(price,b5),b5*10,0),COLOR000000;
{向右延伸}
stickline(fx=2 and b1>0 and b1<n,ref(price,b1),ref(price,b1),10,0),colordddddd;
STICKLINE(fx=2 and b2>0 and b2<n,ref(price,b2),ref(price,b2),10,0),COLORdddddd;
STICKLINE(fx=2 and b3>0 and b3<n,ref(price,b3),ref(price,b3),10,0),COLORdddddd;
STICKLINE(fx=2 and b4>0 and b4<n,ref(price,b4),ref(price,b4),10,0),COLORdddddd;
STICKLINE(fx=2 and b5>0 and b5<n,ref(price,b5),ref(price,b5),10,0),COLORdddddd;
{画K线}
stickline(c>=o,h,l,0,0),colorred;
stickline(c>=o,c,o,5,1),colorred;
stickline(c<o,h,l,0,0),colorffff00;
stickline(c<o,c,o,5,0),colorffff00;










