奇狐社區論壇
在這個頁面顯示本主題全部的 2 個文章

奇狐社區論壇 (http://www.chiefox.com.tw/bbs/index.php)
- 問題交流 (http://www.chiefox.com.tw/bbs/forumdisplay.php?forumid=28)
-- 請教版主 (http://www.chiefox.com.tw/bbs/showthread.php?threadid=16286)


由 BB3219 在 2011-12-09 17:01 發表:

請教版主

我需要一個 併K線 是從開盤開始計算 這指標如何修改 請賜教 指標如下 //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);

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,2,0),COLORRED;
stickline((m=N1-1 or islastbar) and CC<OO,OO,CC,2,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,2,0),colorFF00FF;
stickline(mz=1 and ref(mz=1,1)=0 and CC<OO,HH,OO,2,0),colorCYAN;
stickline(mz=1 and ref(mz=1,1)=0 and CC>=OO,OO,LL,2,0),colorFF00FF;
stickline(mz=1 and ref(mz=1,1)=0 and CC<OO,CC,LL,2,0),colorCYAN;


由 cgjj 在 2011-12-10 13:35 發表:

回覆: 請教版主

引用:
最初由 BB3219 發表
我需要一個 併K線 是從開盤開始計算 這指標如何修改 請賜教 指標如下 //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);
....................



若是從開盤開始計算
那麼結果與日線是相等的


全部時間均為台灣時間, 現在時間為10:59
在這個頁面顯示本主題全部的 2 個文章


Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.

簡愛洋行 製作 Copyright 2003-. All Rights Reserved.