 |
ESP
中級會員
註冊日期: Nov 2004
來 自:
文章數量: 45 |
5分副圖 顯示15分k線的問題請教
版主您好
我想在5分線的副圖
顯示15分或是30 60分的k線
不知道公式要如何寫呢
你們出的書 技術指標通論
裡面有
但是我照著寫以後
卻一直告訴我 - 語法錯誤
以致公式一直做不出來
故在此請求版主幫助
謝謝您
|
|
向版主報告此篇 |  |
|
2007-06-24 00:28 |
|
|
|  |
 |
ESP
中級會員
註冊日期: Nov 2004
來 自:
文章數量: 45 |
再次請教版主
書上的公式可以用了
就是209頁的公式
不過那是1分鐘的副圖
顯示其他週期
我若想改成5分線的副圖
顯示15分 30分 60分
不知該如何改??
謝謝
|
|
向版主報告此篇 |  |
|
2007-06-24 13:28 |
|
|
|  |
 |
peter109
資深會員
註冊日期: Dec 2004
來 自: Taipei
文章數量: 1891 |
論壇中有完整指標
搜索一下就有了
自由週期K線 or CWY
__________________
至誠能勝天下至偽
至拙能勝天下至巧
|
|
向版主報告此篇 |  |
|
2007-06-24 23:06 |
|
|
|  |
 |
kkkkkk
資深會員
註冊日期: Dec 2003
來 自:
文章數量: 291 |
分線上的大K棒我做過4-5種寫法,你的要求可以用下列寫法試試看,應該比較容易了解,不過這種寫法可以應用在1分線和5分線,不易用在其他分時線中,你先試試看
input:N(1,1,2); //N=1--15分, N=2--30分
vertline(date<>ref(date,1)),pointdot,colorwhite;
N1:=if(N=1,3,6);
m:=mod(openminutes(time),N1); //這裡用 mod(barslast(date<>ref(date,1)),N1);是比較正式和用途較廣的寫法,不過下邊的寫法就要改了
b1:=barslast(m=N1-1);
ct:=if(b1[datacount]>0 and b1[datacount]<5,floor((b1[datacount]+1)/2),if(N=1,1,3));
OO:ref(O,b1),linethick0;
Hh:refx(hhv(H,b1+1),N1-1-b1),linethick0;
LL:refx(LLV(L,b1+1),N1-1-b1),linethick0;
CC:refx(C,N1-1-b1),linethick0;
stickline(islastbar and m[datacount]=N1-1 and cc>=oo,cc,oo,8,1),colormagenta;
stickline(islastbar and m[datacount]=N1-1 and cc<oo,cc,oo,8,1),colorcyan;
stickline(islastbar and m[datacount]=N1-1 and cc>=oo,hh,cc,0.5,0),colormagenta;
stickline(islastbar and m[datacount]=N1-1 and cc<oo,hh,oo,0.5,0),colorcyan;
stickline(islastbar and m[datacount]=N1-1 and cc>=oo,oo,LL,0.5,0),colormagenta;
stickline(islastbar and m[datacount]=N1-1 and cc<oo,cc,LL,0.5,0),colorcyan;
stickline((b1=0 and not(islastbar)) and cc>=oo,cc,oo,0.5,0),colormagenta;
stickline((b1=0 and not(islastbar)) and cc<oo,cc,oo,0.5,0),colorcyan;
stickline((m=0 or (islastbar and b1[datacount]>0)) and cc>=oo,cc,oo,0.5,0),colormagenta;
stickline((m=0 or (islastbar and b1[datacount]>0)) and cc<oo,cc,oo,0.5,0),colorcyan;
stickline(b1=ct and cc>=oo,hh,cc,0.5,0),colormagenta;
stickline(b1=ct and cc<oo,hh,oo,0.5,0),colorcyan;
stickline(b1=ct and cc>=oo,oo,LL,0.5,0),colormagenta;
stickline(b1=ct and cc<oo,cc,LL,0.5,0),colorcyan;
partline(b1>0 and cc>=oo,CC),colormagenta;
partline(b1>0 and cc<oo,CC),colorcyan;
partline(b1>0 and cc>=oo,OO),colormagenta;
partline(b1>0 and cc<oo,OO),colorcyan;
kkkkkk 附帶上了此圖片:
|
最後由 kkkkkk 在 2007-06-28 11:10 編輯 |
向版主報告此篇 |  |
|
2007-06-28 09:58 |
|
|
|  |
 |
ESP
中級會員
註冊日期: Nov 2004
來 自:
文章數量: 45 |
真是太感激了
好指標
不知道該說什麼才好
真是寫的太棒了
請問如果要增加一個60分線的話
不知道怎樣改
因為這對我來說真的比較難一點...
|
|
向版主報告此篇 |  |
|
2007-06-28 14:18 |
|
|
|  |
 |
kkkkkk
資深會員
註冊日期: Dec 2003
來 自:
文章數量: 291 |
//當開市首日如果資料不是從開盤點起算,第二天以後看開市第一天的大K線型會有誤差,但是當天盤中是正確的
//我認為這是一個無傷大雅的"bug"所以懶得再寫一堆程式去排除他
vertline(date<>ref(date,1) or barpos=1),pointdot,colorwhite;
w:=barslast(date<>ref(date,1) or barpos=1);
m:=mod(w,12);
N:=if(stktype=7,11,5);
b1:=barslast(m=0),linethick0;
ct:=backset(m=11 or refx(m,1)=0 or islastbar,floor(m/2));
OO:ref(O,b1),linethick0;
Hh:refx(hhv(H,b1+1),if(w>=48,N-b1,11-b1)),linethick0;
LL:refx(LLV(L,b1+1),if(w>=48,N-b1,11-b1)),linethick0;
CC:refx(C,if(w>=48,N-b1,11-b1)),linethick0;
stickline((m=0 or refx(m,1)=0 or islastbar) and cc>=oo,cc,oo,0.5,0),colormagenta;
stickline((m=0 or refx(m,1)=0 or islastbar) and cc<oo,cc,oo,0.5,0),colorcyan;
partline(m>0 and CC>=OO,CC),colormagenta;partline(m>0 and CC<OO,CC),colorcyan;
partline(m>0 and CC>=OO,OO),colormagenta;partline(m>0 and CC<OO,OO),colorcyan;
stickline((ct=0 and (refx(ct,1)=1 or islastbar)) and cc>=oo,hh,cc,0.5,0),colormagenta;
stickline((ct=0 and (refx(ct,1)=1 or islastbar)) and cc<oo,hh,oo,0.5,0),colorcyan;
stickline((ct=0 and (refx(ct,1)=1 or islastbar)) and cc>=oo,oo,LL,0.5,0),colormagenta;
stickline((ct=0 and (refx(ct,1)=1 or islastbar)) and cc<oo,CC,LL,0.5,0),colorcyan;
stickline(islastbar and m[datacount]=0 and cc>=oo,cc,oo,8,1),colormagenta;
stickline(islastbar and m[datacount]=0 and cc<oo,cc,oo,8,1),colorcyan;
stickline(islastbar and m[datacount]=0 and cc>=oo,hh,cc,0.5,0),colormagenta;
stickline(islastbar and m[datacount]=0 and cc<oo,hh,oo,0.5,0),colorcyan;
stickline(islastbar and m[datacount]=0 and cc>=oo,oo,LL,0.5,0),colormagenta;
stickline(islastbar and m[datacount]=0 and cc<oo,cc,LL,0.5,0),colorcyan;
|
|
向版主報告此篇 |  |
|
2007-06-29 06:06 |
|
|
|  |
 |
ESP
中級會員
註冊日期: Nov 2004
來 自:
文章數量: 45 |
感謝 再感謝
您真是大恩人啊
真的是非常好的指標
謝謝您
|
|
向版主報告此篇 |  |
|
2007-06-29 09:14 |
|
|
|  |
 |
P0178
初級會員
註冊日期: Jan 2004
來 自:
文章數量: 24 |
可否在1分看5分k線
請問kk大
可否幫忙也有一個指標在1分同時看5分的k線
拜託幫忙
|
|
向版主報告此篇 |  |
|
2007-11-24 11:16 |
|
|
|  |
 |
華陽
中級會員
註冊日期: Sep 2006
來 自:
文章數量: 43 |
回覆: 可否在1分看5分k線
引用: 最初由 P0178 發表
請問kk大
可否幫忙也有一個指標在1分同時看5分的k線
拜託幫忙
這個行嗎?
{任意K線}
DRAWGBK(1, COLORRGB(50,50,50),COLORRGB(100,100,100),0);
input:AA(5,1,1000),BB(15,1,1000);
{月--週期K線}
if datacount<BB then exit;
y1:=mod(barpos,BB);
Y2:=if(y1=0,BB-1,y1-1);
Y3:=barslast(Y2=0);
Y4:=barslast(Y2=BB-1);
Y5:=ref(o,Y3);
Y6:=hhv(h,Y3+1)*(Y4=0);
Y7:=llv(if(L=0,100000,L),Y3+1)*(Y4=0);
Y8:=IF(Y3=0,C,0);
Y9:=IF(Y4=0,C,0);
Y10:=IF(Y4=0,Y6,0);
Y11:=IF(Y4=0,Y7,0);
for n=lbound(Y8) to ubound(Y8) do begin
if Y8[n]>0 then begin
for z=n+BB-1 to ubound(Y8) do begin
if Y9[z]>0 then begin
for s=n to z-1 do begin
YC1[s]:=Y9[z];
YH1[s]:=Y10[z];
YL1[s]:=Y11[z];
end;
break;
end;
end;
end;
end;
YXQc1:=C;
YXQh1:=hhv(h,Y2[datacount]+1);
XQL1:=LLV(if(L=0,1000000,L),Y2[datacount]+1);
YXQCC:=if(barpos>datacount-Y2[datacount]-1,YXQc1[datacount],if(Y2=BB-1,C,YC1));
YXQHH:=if(barpos>datacount-Y2[datacount]-1,YXQh1[datacount],if(Y2=BB-1,ref(YH1,1),YH1));
YXQLL:=if(barpos>datacount-Y2[datacount]-1,XQL1[datacount],if(Y2=BB-1,ref(YL1,1),YL1));
{周--週期K線}
if datacount<AA then exit;
Z1:=mod(barpos,AA);
Z2:=if(Z1=0,AA-1,Z1-1);
Z3:=barslast(Z2=0);
Z4:=barslast(Z2=AA-1);
Z5:=ref(o,Z3);
Z6:=hhv(h,Z3+1)*(Z4=0);
Z7:=llv(if(L=0,100000,L),Z3+1)*(Z4=0);
Z8:=IF(Z3=0,C,0);
Z9:=IF(Z4=0,C,0);
Z11:=IF(Z4=0,Z6,0);
Z12:=IF(Z4=0,Z7,0);
for n=lbound(Z8) to ubound(Z8) do begin
if Z8[n]>0 then begin
for z=n+AA-1 to ubound(Z8) do begin
if Z9[z]>0 then begin
for s=n to z-1 do begin
ZC1[s]:=Z9[z];
ZH1[s]:=Z11[z];
ZL1[s]:=Z12[z];
end;
break;
end;
end;
end;
end;
Zzc1:=C;
Zzh1:=hhv(h,Z2[datacount]+1);
ZzL1:=LLV(if(L=0,1000000,L),Z2[datacount]+1);
ZzCC:=if(barpos>datacount-Z2[datacount]-1,Zzc1[datacount],if(Z2=AA-1,C,ZC1));
ZzHH:=if(barpos>datacount-Z2[datacount]-1,Zzh1[datacount],if(Z2=AA-1,ref(ZH1,1),ZH1));
ZzLL:=if(barpos>datacount-Z2[datacount]-1,ZzL1[datacount],if(Z2=AA-1,ref(ZL1,1),ZL1));
{-----------------【圖解範本】---------------------}
{月--週期K線}
FILLRGN(Y2>0 and YXQCC>=Y5,YXQHH,YXQLL),ColorA8A6FF;
FILLRGN(Y2>0 and YXQCC<Y5,YXQHH,YXQLL),ColorD8A668;
{周--週期K線}
FILLRGN(Z2>0 and ZzCC>=Z5,ZzHH,ZzLL),Color8787E9;
FILLRGN(Z2>0 and ZzCC<Z5,ZzHH,ZzLL),ColorFF8E18;
{日--K線}
STICKLINE(C>O,C,O,6,1),COLORRED;
STICKLINE(C>O,C,H,0,1),COLORRED;
STICKLINE(C>O,L,O,0,1),COLORRED;
STICKLINE(O>=C,H,L,0,0),ColorFFFF00;
STICKLINE(O>=C,O,C,6,0),ColorFFFF00;
//
|
|
向版主報告此篇 |  |
|
2007-11-25 09:26 |
|
|
|  |
 |
itam
中級會員
註冊日期: Jun 2006
來 自:
文章數量: 38 |
波濤洶湧,不可捉摸
現前頓感輕爽
拜訪寶地
巧遇如意金箍棒
知大、見大
格局大
百千法門,同歸方寸
多位前輩熱誠提拔
獲益匪淺,真心感恩!
|
|
向版主報告此篇 |  |
|
2007-11-25 18:39 |
|
|
|  |
 |
P0178
初級會員
註冊日期: Jan 2004
來 自:
文章數量: 24 |
有上線影線的k線
謝謝華陽大
不過我想要的是如k大前所述圖的k棒能出現上線影線k棒的指標
感謝您
|
|
向版主報告此篇 |  |
|
2007-11-26 08:27 |
|
|
|  |
 |
jery3308
資深會員

註冊日期: Jun 2005
來 自:
文章數量: 178 |
任意K
{任意K線}
DRAWGBK(1, COLORRGB(50,50,50),COLORRGB(100,100,100),0);
input:AA(5,1,1000),BB(15,1,1000);
{月--週期K線}
if datacount<BB then exit;
y1:=mod(barpos,BB);
Y2:=if(y1=0,BB-1,y1-1);
Y3:=barslast(Y2=0);
Y4:=barslast(Y2=BB-1);
Y5:=ref(o,Y3);
Y6:=hhv(h,Y3+1)*(Y4=0);
Y7:=llv(if(L=0,100000,L),Y3+1)*(Y4=0);
Y8:=IF(Y3=0,C,0);
Y9:=IF(Y4=0,C,0);
Y10:=IF(Y4=0,Y6,0);
Y11:=IF(Y4=0,Y7,0);
for n=lbound(Y8) to ubound(Y8) do begin
if Y8[n]>0 then begin
for z=n+BB-1 to ubound(Y8) do begin
if Y9[z]>0 then begin
for s=n to z-1 do begin
YC1[s]:=Y9[z];
YH1[s]:=Y10[z];
YL1[s]:=Y11[z];
end;
break;
end;
end;
end;
end;
YXQc1:=C;
YXQh1:=hhv(h,Y2[datacount]+1);
XQL1:=LLV(if(L=0,1000000,L),Y2[datacount]+1);
YXQCC:=if(barpos>datacount-Y2[datacount]-1,YXQc1[datacount],if(Y2=BB-1,C,YC1));
YXQHH:=if(barpos>datacount-Y2[datacount]-1,YXQh1[datacount],if(Y2=BB-1,ref(YH1,1),YH1));
YXQLL:=if(barpos>datacount-Y2[datacount]-1,XQL1[datacount],if(Y2=BB-1,ref(YL1,1),YL1));
{周--週期K線}
if datacount<AA then exit;
Z1:=mod(barpos,AA);
Z2:=if(Z1=0,AA-1,Z1-1);
Z3:=barslast(Z2=0);
Z4:=barslast(Z2=AA-1);
Z5:=ref(o,Z3);
Z6:=hhv(h,Z3+1)*(Z4=0);
Z7:=llv(if(L=0,100000,L),Z3+1)*(Z4=0);
Z8:=IF(Z3=0,C,0);
Z9:=IF(Z4=0,C,0);
Z11:=IF(Z4=0,Z6,0);
Z12:=IF(Z4=0,Z7,0);
for n=lbound(Z8) to ubound(Z8) do begin
if Z8[n]>0 then begin
for z=n+AA-1 to ubound(Z8) do begin
if Z9[z]>0 then begin
for s=n to z-1 do begin
ZC1[s]:=Z9[z];
ZH1[s]:=Z11[z];
ZL1[s]:=Z12[z];
end;
break;
end;
end;
end;
end;
Zzc1:=C;
Zzh1:=hhv(h,Z2[datacount]+1);
ZzL1:=LLV(if(L=0,1000000,L),Z2[datacount]+1);
ZzCC:=if(barpos>datacount-Z2[datacount]-1,Zzc1[datacount],if(Z2=AA-1,C,ZC1));
ZzHH:=if(barpos>datacount-Z2[datacount]-1,Zzh1[datacount],if(Z2=AA-1,ref(ZH1,1),ZH1));
ZzLL:=if(barpos>datacount-Z2[datacount]-1,ZzL1[datacount],if(Z2=AA-1,ref(ZL1,1),ZL1));
{-----------------【圖解範本】---------------------}
{月--週期K線}
FILLRGN(Y2>0 and YXQCC>=Y5,YXQHH,YXQLL),ColorA8A6FF;
FILLRGN(Y2>0 and YXQCC<Y5,YXQHH,YXQLL),ColorD8A668;
{周--週期K線}
FILLRGN(Z2>0 and ZzCC>=Z5,ZzHH,ZzLL),Color8787E9;
FILLRGN(Z2>0 and ZzCC<Z5,ZzHH,ZzLL),ColorFF8E18;
{日--K線}
STICKLINE(C>O,C,O,6,1),COLORRED;
STICKLINE(C>O,C,H,0,1),COLORRED;
STICKLINE(C>O,L,O,0,1),COLORRED;
STICKLINE(O>=C,H,L,0,0),ColorFFFF00;
STICKLINE(O>=C,O,C,6,0),ColorFFFF00;
如何調整周k線從周一起算, 非周二?
月k 從每月一日或每月第一個營業日?
謝謝
|
|
向版主報告此篇 |  |
|
2013-07-23 15:54 |
|
|
|  |
本站所有內容未經作者授權禁止轉貼節錄, 發表言論僅供參考勿作為投資決策依據。瀏覽本站請使用 IE 5.5 以上版本, 最佳瀏覽解析度 1024 x 768 全彩。
|
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved. 聯絡我們
|