求助
板大您好..不好意思!又來打擾!
3分K現線圖引用9支大K線最高與最低線沒對齊?可以修正嗎?
另外我多設一視窗27分K圖一樣9支K線不變.修改27分X9大K
X3MA高低值的地方能幫我加記我已後自己調..或公司有幫客
戶寫付費語法嗎?一直麻煩你不好意思!再次感嗯!
//input:N1(20,1,1000);
if datacount<N1 then exit;
m1:=mod(barpos,N1);m:=if(m1=0,N1-1,m1-1);mz:=backset(m=N1-1 or islastbar,intpart(m/2)+1);
//vertline(m=0),colorred,pointdot;
//vertline(m=N1-1),colorgreen,pointdot;
bx:=barslast(m=0);by:=barslast(m=N1-1);
OO:ref(o,bx),linethick0;
Cy:=ref(C*(by=0),barslast(C*(by=0)));hhx:=hhv(h,bx+1)*(by=0);llx:=llv(if(L=0,100000,L),bx+1)*(by=0);
cab:=IF(bx=0,CLOSE,0);cba:=IF(by=0,CLOSE,0);CC1:=c*0;cba1:=IF(by=0,HHX,0);HH1:=c*0;cba2:=IF(by=0,LLX,0);LL1:=c*0;
for n=lbound(cab) to ubound(cab) do begin
if cab[n]>0 then begin
for z=n+N1-1 to ubound(cab) do begin
if cba[z]>0 then begin
for s=n to z-1 do begin
CC1[s]:=cba[z];
HH1[s]:=cba1[z];
LL1[s]:=cba2[z];
end;
break;
end;
end;
end;
end;
c1:=C;h3:=hhv(h,m[datacount]+1);L3:=LLV(if(L=0,1000000,L),m[datacount]+1);
CC:if(barpos>datacount-m[datacount]-1,c1[datacount],if(m=N1-1,C,CC1)),linethick0;
HH:if(barpos>datacount-m[datacount]-1,h3[datacount],if(m=N1-1,ref(HH1,1),HH1)),linethick0;
LL:if(barpos>datacount-m[datacount]-1,L3[datacount],if(m=N1-1,ref(LL1,1),LL1)),linethick0;
partline(m>0 and CC>=OO,CC),colorred;
partline(m>0 and CC<OO,CC),colorcyan;
partline(m>0 and CC>=OO,OO),colorred;
partline(m>0 and CC<OO,OO),colorcyan;
stickline((m=N1-1 or islastbar) and CC>=OO,OO,CC,1,0),colorred;
stickline((m=N1-1 or islastbar) and CC<OO,OO,CC,1,0),colorcyan;
stickline(m=0 and CC>=OO,OO,CC,1,0),colorred;
stickline(m=0 and CC<OO,OO,CC,1,0),colorcyan;
stickline(mz=1 and ref(mz=1,1)=0 and CC>=OO,HH,CC,1,0),colorred;
stickline(mz=1 and ref(mz=1,1)=0 and CC<OO,HH,OO,1,0),colorcyan;
stickline(mz=1 and ref(mz=1,1)=0 and CC>=OO,OO,LL,1,0),colorred;
stickline(mz=1 and ref(mz=1,1)=0 and CC<OO,CC,LL,1,0),colorcyan;
UK:=9; // 9=27/3
DESP:=barslast(date<>ref(date,1))+1;
MKR:=mod(DESP,UK)=0 or barpos=datacount;
SP:=barslast(mod(DESP,UK)=1);
MKH:=HHV(H,SP+1); MKL:=LLV(L,SP+1);
NN:=3;
MASP:=SUMBARS(MKR,NN);
MKMAH3:SUM(IF(MKR,MKH,0),MASP)/NN;
MKMAL3:SUM(IF(MKR,MKL,0),MASP)/NN;
lb:=lbound(MKMAH3);
if lb=0 then exit;
x:=SETLBOUND(MKMAH3,lb-SP[lb]);
x:=SETLBOUND(MKMAL3,lb-SP[lb]);
MKMAH3:=SETVAL(MKR and SP>0,MKMAH3,-SP,MKMAH3);
MKMAL3:=SETVAL(MKR and SP>0,MKMAL3,-SP,MKMAL3);
|