drawsl(islastbar,close,0,15,2),linethick1,coloryellow,LINETHICK2;drawsl(islastbar,close,0,30,2),linethick1,colorred,LINETHICK1;
stickline(barpos=datacount-30 and c>=O,c,o,15,0,COLORMAGENTA);
stickline(barpos=datacount-30 and c>=o,c,o,15,0,COLORMAGENTA);
stickline(barpos=datacount-30 and c<O,c,o,15,0,COLOrblue);
stickline(barpos=datacount-15 and c<o,c,o,15,0,COLORblue);
cond:=c<=ref(CLOSE,15);
ma15:=ma(c,15);
if cond then aa:ma15;
else bb:ma15;
partline(c<=ref(CLOSE,15),ma15, COLORGREEN),linethick1;
partline(c>ref(CLOSE,15),ma15,COLORred),linethick1;
cond1:=c<=ref(CLOSE,30);
ma30:=ma(c,30);
if cond1 then aa1:ma30;
else bb1:ma30;
partline(c<=ref(CLOSE,30),ma30, COLORGREEN),linethick2;
partline(c>ref(CLOSE,30),ma30,COLORred),linethick2;
variable:p=0,w=0;
kong:=c<ref(CLOSE,10) and c<ref(CLOSE,22) and c<ref(CLOSE,51);
duo:=c>ref(CLOSE,10) and c>ref(CLOSE,22) and c>ref(CLOSE,51);
if kong then begin
p:=p+1;
w:=0;
end
if duo then begin
w:=w+1;
p:=0;
end
//drawtext(cross(p=1,0.5),c*1.001,'空');
//drawtext(cross(w=1,0.5),c*0.999,'多');
variable:n=0,m=0;
mm:=ref(h,1)=hhv(h,3);
nn:=ref(l,1)=llv(l,3);
variable:bj=0;
variable:dt=0,kt=0;
mm:=ref(h,1)=hhv(h,3);
nn:=ref(l,1)=llv(l,3);
if mm then bj:=1;
if nn then bj:=-1;
nn1:=barslast(mm);
nn2:=barslast(nn);
if c<ref(l,nn1+1) and bj=1 then i:=1;
if c>ref(h,nn2+1) and bj=-1 then i:=-1;
uu3:=cross(i=1,0.5);
uu4:=cross(i=-1,0.5);
if uu3 or ((ref(c,1)>ref(o,1) and h>ref(h,1) and c<ref(l,1))) or (ref(h,1)=hhv(h,3) and c<ref(l,1)) or c<ref(l,barslast(c>o)) then begin
n:=0;
m:=m+1;
end
//m为绿色
if uu4 or (ref(l,1)=llv(l,3) and c>ref(h,1)) or ((ref(o,1)>ref(c,1) and l<ref(l,1) and c>ref(h,1))) or c>ref(h,barslast(c<o)) then begin
n:=n+1;
m:=0;
end
//n为红色
STICKLINE(cross(m,0.5),o,CLOSE,10.5,0),COLORgreen;
STICKLINE(cross(n,0.5),o,c,10.5,0),COLORred;
ma30:=ma(c,30);
jc:=cross(ma30,c);
sc:=cross(c,ma30);
gl:(c-ma30)/ma(c,30)*10000,linethick0;
fgl:valuewhen(sc,(llv(l-ma30,barslast(jc)+1))/ma(c,30))*10000,linethick0;
zgl:valuewhen(jc,(hhv(abs(h-ma30),barslast(sc)+1))/ma(c,30))*10000,linethick0;
ss:stkindi('','YY.status_result',0,3),linethick0;
c1:=stkindi('','yy.c2',0,3),linethick0;
variable:bj=0;
MID := MA(CLOSE,26);
UPPER:= MID + 2*STD(CLOSE,26);
LOWER:= MID - 2*STD(CLOSE,26);
多空:=stkindi('','多空差柱.多空差',0,p1);
多空1:=stkindi('','多空差柱.多空差',0,b1);
if 多空>0 then bj:=1;
if 多空<0 then bj:=-1;
if 多空1>0 then bj:=1;
if 多空1<0 then bj:=-1;
PARTLINE(多空>0,UPPER,COLORRED),linethick2;
PARTLINE(多空<0,UPPER,COLORGREEN),linethick2;
PARTLINE(多空=0,UPPER,COLORBLUE),linethick2;
PARTLINE(多空1>0,LOWER,COLORRED),linethick1;
PARTLINE(多空1<0,LOWER,COLORGREEN),linethick1;
PARTLINE(多空1=0,LOWER,COLORBLUE),linethick1;
分析1楼指标大量使用全局变量语句,无法通过wh6修改实现的
其它部分均线语句修改可以参考:
DRAWSL(ISLASTBAR,CLOSE,0,15,2,COLORYELLOW),LINETHICK1,LINETHICK2;
DRAWSL(ISLASTBAR,CLOSE,0,30,2,COLORRED),LINETHICK1,LINETHICK1;
STICKLINE(BARPOS=DATACOUNT-30 AND C>=O,C,O,COLORMAGENTA,0);
STICKLINE(BARPOS=DATACOUNT-30 AND C>=O,C,O,COLORMAGENTA,0);
STICKLINE(BARPOS=DATACOUNT-30 AND C<O,C,O,COLORBLUE,0);
STICKLINE(BARPOS=DATACOUNT-15 AND C<O,C,O,COLORBLUE,0);
COND:=C<=REF(CLOSE,15);
MA15:=MA(C,15);
PARTLINE(C<=REF(CLOSE,15),MA15, COLORGREEN),LINETHICK1;
PARTLINE(C>REF(CLOSE,15),MA15,COLORRED),LINETHICK1;
COND1:=C<=REF(CLOSE,30);
MA30:=MA(C,30);
PARTLINE(C<=REF(CLOSE,30),MA30, COLORGREEN),LINETHICK2;
PARTLINE(C>REF(CLOSE,30),MA30,COLORRED),LINETHICK2;