到奇狐勝券首頁 奇狐社區論壇 購買奇狐勝券 試用奇狐勝券
 
論壇首頁 你可以在這裡編輯你的資料,查看短訊,訂閱主題和論壇參數等等 免費會員註冊 會員列表 論壇幫助 論壇日曆 論壇搜索 加入我的最愛 登出論壇  
奇狐社區論壇 : Powered by vBulletin version 2.3.0 奇狐社區論壇 > 指標公式 > 問題交流 > [問題]限制K棒數之疊加成交量橫條圖,只取前3大量橫條
  上一主題   下一主題
作者
主題 發表新主題    回覆主題
Markchu7
資深會員

註冊日期: Nov 2007
來  自:
文章數量: 1496

[問題]限制K棒數之疊加成交量橫條圖,只取前3大量橫條

附圖是蒙總版主協助指導之限制K棒數之疊加成交量橫條圖主圖!
源碼如下:
分鐘首K:=ISREGULARFBAR;
換日首K:=TRADEDATE<>REF(TRADEDATE,1);
歷史首K:=BARPOS=1;
DBCK:=IF((DATATYPE=1 OR DATATYPE=12) AND STKLABEL='FITX1+',TIME=084600 OR TIME=150100,IF(DATATYPE=1 OR DATATYPE=11 OR DATATYPE=2,分鐘首K OR 換日首K,歷史首K)),LINETHICK;
CKSP:=BARSLAST(DBCK)+1,LINETHICK;

N:=10; CC:=C; VV:=V; KK:=89;
KL:=datacount-KK+1; KR:=datacount; if KR<KK then exit;
KN:=barpos-KL; KZ:=KR-KL;
PH:=HHV(H,60); PH:=PH[datacount];
PL:=LLV(L,60); PL:=PL[datacount];
PS:=(PH-PL)/10;
VARIABLE:MH[N]=0,MZ[N]=0,ML[N]=0,MP[N]=0;
PS2:=PS/2; VZ:=0; MaxMZ:=0;
for i=1 to N do begin
MH[i]:=PH-PS*(i-1);
for k=KL to KR do begin
if CC[k]<=MH[i] and CC[k]>MH[i]-PS-PS*(i=N) then MZ[i]:=MZ[i]+VV[k];
end;
VZ:=VZ+MZ[i]; if MZ[i]>MaxMZ then MaxMZ:=MZ[i];
end;
for i=1 to N do begin
ML[i]:=MZ[i]/MaxMZ; MP[i]:=MZ[i]/VZ*100;
end;
DW:=barpos>KL;
RT:=barpos<KL+KZ*0.25;


FILLRGN(ML[01]>=KN/KZ and DW,MH[01],MH[01]-PS) colorBBBBBB;
FILLRGN(ML[02]>=KN/KZ and DW,MH[02],MH[02]-PS) color888888;
FILLRGN(ML[03]>=KN/KZ and DW,MH[03],MH[03]-PS) colorBBBBBB;
FILLRGN(ML[04]>=KN/KZ and DW,MH[04],MH[04]-PS) color888888;
FILLRGN(ML[05]>=KN/KZ and DW,MH[05],MH[05]-PS) colorBBBBBB;
FILLRGN(ML[06]>=KN/KZ and DW,MH[06],MH[06]-PS) color888888;
FILLRGN(ML[07]>=KN/KZ and DW,MH[07],MH[07]-PS) colorBBBBBB;
FILLRGN(ML[08]>=KN/KZ and DW,MH[08],MH[08]-PS) color888888;
FILLRGN(ML[09]>=KN/KZ and DW,MH[09],MH[09]-PS) colorBBBBBB;
FILLRGN(ML[10]>=KN/KZ and DW,MH[10],MH[10]-PS) color888888;

DRAWTEXT(barpos=KL+floor(KZ*ML[01]) and RT=0,MH[01]-PS2,numtostr(MP[01],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[02]) and RT=0,MH[02]-PS2,numtostr(MP[02],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[03]) and RT=0,MH[03]-PS2,numtostr(MP[03],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[04]) and RT=0,MH[04]-PS2,numtostr(MP[04],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[05]) and RT=0,MH[05]-PS2,numtostr(MP[05],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[06]) and RT=0,MH[06]-PS2,numtostr(MP[06],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[07]) and RT=0,MH[07]-PS2,numtostr(MP[07],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[08]) and RT=0,MH[08]-PS2,numtostr(MP[08],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[09]) and RT=0,MH[09]-PS2,numtostr(MP[09],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[10]) and RT=0,MH[10]-PS2,numtostr(MP[10],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[01]) and RT=1,MH[01]-PS2,' '+numtostr(MP[01],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[02]) and RT=1,MH[02]-PS2,' '+numtostr(MP[02],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[03]) and RT=1,MH[03]-PS2,' '+numtostr(MP[03],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[04]) and RT=1,MH[04]-PS2,' '+numtostr(MP[04],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[05]) and RT=1,MH[05]-PS2,' '+numtostr(MP[05],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[06]) and RT=1,MH[06]-PS2,' '+numtostr(MP[06],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[07]) and RT=1,MH[07]-PS2,' '+numtostr(MP[07],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[08]) and RT=1,MH[08]-PS2,' '+numtostr(MP[08],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[09]) and RT=1,MH[09]-PS2,' '+numtostr(MP[09],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[10]) and RT=1,MH[10]-PS2,' '+numtostr(MP[10],2)+'%') ALIGN1 pxup8 color000000;

kline(O,H,L,C,0);

能否請總版主協助修改為:只取前3大量橫條,其餘4~10,無須顯示!

感謝!祝龍年行大運!

Markchu7 附帶上了此圖片:

向版主報告此篇 | 查IP位址
Old Post 2024-02-15 17:54
Markchu7 現在離線 點選這裡查看 Markchu7 的個人資料 點選這裡給 Markchu7 傳送一條短訊 查找更多關於 Markchu7 的文章 增加 Markchu7 至你的好友列表 編輯/刪除訊息 引用回覆
Markchu7
資深會員

註冊日期: Nov 2007
來  自:
文章數量: 1496

剛發現:if KR<KK then exit;這段公式限制了部分效果!
請總版主忽略此貼!
個人會再另提協助需求!謝謝!

向版主報告此篇 | 查IP位址
Old Post 2024-02-16 09:00
Markchu7 現在離線 點選這裡查看 Markchu7 的個人資料 點選這裡給 Markchu7 傳送一條短訊 查找更多關於 Markchu7 的文章 增加 Markchu7 至你的好友列表 編輯/刪除訊息 引用回覆
cgjj
總版主

註冊日期: Oct 2003
來  自:
文章數量: 18091

回覆: [問題]限制K棒數之疊加成交量橫條圖,只取前3大量橫條

引用:
最初由 Markchu7 發表
附圖是蒙總版主協助指導之限制K棒數之疊加成交量橫條圖主圖!
源碼如下:
分鐘首K:=ISREGULARFBAR;
換日首K:=TRADEDATE<>REF(TRADEDATE,1);
歷史首K:=BARPOS=1;
DBCK:=IF((DATATYPE=1 OR DATATYPE=12) AND STKLABEL='FITX1+',TIME=084600 OR TIME=150100,IF(DATATYPE=1 OR DATATYPE=11 OR DATATYPE=2,分鐘首K OR 換日首K,歷史首K)),LINETHICK;
CKSP:=BARSLAST(DBCK)+1,LINETHICK;

N:=10; CC:=C; VV:=V; KK:=89;
KL:=datacount-KK+1; KR:=datacount; if KR<KK then exit;
KN:=barpos-KL; KZ:=KR-KL;
PH:=HHV(H,60); PH:=PH[datacount];
PL:=LLV(L,60); PL:=PL[datacount];
PS:=(PH-PL)/10;
VARIABLE:MH[N]=0,MZ[N]=0,ML[N]=0,MP[N]=0;
PS2:=PS/2; VZ:=0; MaxMZ:=0;
for i=1 to N do begin
MH[i]:=PH-PS*(i-1);
for k=KL to KR do begin
if CC[k]<=MH[i] and CC[k]>MH[i]-PS-PS*(i=N) then MZ[i]:=MZ[i]+VV[k];
end;
VZ:=VZ+MZ[i]; if MZ[i]>MaxMZ then MaxMZ:=MZ[i];
end;
for i=1 to N do begin
ML[i]:=MZ[i]/MaxMZ; MP[i]:=MZ[i]/VZ*100;
end;
DW:=barpos>KL;
RT:=barpos<KL+KZ*0.25;


FILLRGN(ML[01]>=KN/KZ and DW,MH[01],MH[01]-PS) colorBBBBBB;
FILLRGN(ML[02]>=KN/KZ and DW,MH[02],MH[02]-PS) color888888;
FILLRGN(ML[03]>=KN/KZ and DW,MH[03],MH[03]-PS) colorBBBBBB;
FILLRGN(ML[04]>=KN/KZ and DW,MH[04],MH[04]-PS) color888888;
FILLRGN(ML[05]>=KN/KZ and DW,MH[05],MH[05]-PS) colorBBBBBB;
FILLRGN(ML[06]>=KN/KZ and DW,MH[06],MH[06]-PS) color888888;
FILLRGN(ML[07]>=KN/KZ and DW,MH[07],MH[07]-PS) colorBBBBBB;
FILLRGN(ML[08]>=KN/KZ and DW,MH[08],MH[08]-PS) color888888;
FILLRGN(ML[09]>=KN/KZ and DW,MH[09],MH[09]-PS) colorBBBBBB;
FILLRGN(ML[10]>=KN/KZ and DW,MH[10],MH[10]-PS) color888888;

DRAWTEXT(barpos=KL+floor(KZ*ML[01]) and RT=0,MH[01]-PS2,numtostr(MP[01],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[02]) and RT=0,MH[02]-PS2,numtostr(MP[02],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[03]) and RT=0,MH[03]-PS2,numtostr(MP[03],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[04]) and RT=0,MH[04]-PS2,numtostr(MP[04],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[05]) and RT=0,MH[05]-PS2,numtostr(MP[05],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[06]) and RT=0,MH[06]-PS2,numtostr(MP[06],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[07]) and RT=0,MH[07]-PS2,numtostr(MP[07],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[08]) and RT=0,MH[08]-PS2,numtostr(MP[08],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[09]) and RT=0,MH[09]-PS2,numtostr(MP[09],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[10]) and RT=0,MH[10]-PS2,numtostr(MP[10],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[01]) and RT=1,MH[01]-PS2,' '+numtostr(MP[01],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[02]) and RT=1,MH[02]-PS2,' '+numtostr(MP[02],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[03]) and RT=1,MH[03]-PS2,' '+numtostr(MP[03],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[04]) and RT=1,MH[04]-PS2,' '+numtostr(MP[04],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[05]) and RT=1,MH[05]-PS2,' '+numtostr(MP[05],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[06]) and RT=1,MH[06]-PS2,' '+numtostr(MP[06],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[07]) and RT=1,MH[07]-PS2,' '+numtostr(MP[07],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[08]) and RT=1,MH[08]-PS2,' '+numtostr(MP[08],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[09]) and RT=1,MH[09]-PS2,' '+numtostr(MP[09],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=KL+floor(KZ*ML[10]) and RT=1,MH[10]-PS2,' '+numtostr(MP[10],2)+'%') ALIGN1 pxup8 color000000;

kline(O,H,L,C,0);

能否請總版主協助修改為:只取前3大量橫條,其餘4~10,無須顯示!

感謝!祝龍年行大運!



原碼:
分鐘首K:=ISREGULARFBAR; 換日首K:=TRADEDATE<>REF(TRADEDATE,1); 歷史首K:=BARPOS=1; DBCK:=IF((DATATYPE=1 OR DATATYPE=12) AND STKLABEL='FITX1+',TIME=084600 OR TIME=150100,IF(DATATYPE=1 OR DATATYPE=11 OR DATATYPE=2,分鐘首K OR 換日首K,歷史首K)),LINETHICK; CKSP:=BARSLAST(DBCK)+1,LINETHICK; N:=10; CC:=C; VV:=V; KK:=89; KL:=datacount-KK+1; KR:=datacount; if KR<KK then exit; KN:=barpos-KL; KZ:=KR-KL; PH:=HHV(H,60); PH:=PH[datacount]; PL:=LLV(L,60); PL:=PL[datacount]; PS:=(PH-PL)/10; VARIABLE:MH[N]=0,MZ[N]=0,ML[N]=0,MP[N]=0,DK[N]=0,SN[N]=0; PS2:=PS/2; VZ:=0; MaxMZ:=0; for i=1 to N do begin MH[i]:=PH-PS*(i-1); for k=KL to KR do begin if CC[k]<=MH[i] and CC[k]>MH[i]-PS-PS*(i=N) then MZ[i]:=MZ[i]+VV[k]; end; VZ:=VZ+MZ[i]; if MZ[i]>MaxMZ then MaxMZ:=MZ[i]; end; for i=1 to N do begin ML[i]:=MZ[i]/MaxMZ; MP[i]:=MZ[i]/VZ*100; DK[i]:=KL+floor(KZ*ML[i]); end; x:=sortpos(MZ,1,1,N); for i=1 to N do SN[MZ[i]]:=i; DW:=barpos>KL; RT:=barpos<KL+KZ*0.25; FILLRGN(ML[01]>=KN/KZ and DW and SN[01]<4,MH[01],MH[01]-PS) colorBBBBBB; FILLRGN(ML[02]>=KN/KZ and DW and SN[02]<4,MH[02],MH[02]-PS) color888888; FILLRGN(ML[03]>=KN/KZ and DW and SN[03]<4,MH[03],MH[03]-PS) colorBBBBBB; FILLRGN(ML[04]>=KN/KZ and DW and SN[04]<4,MH[04],MH[04]-PS) color888888; FILLRGN(ML[05]>=KN/KZ and DW and SN[05]<4,MH[05],MH[05]-PS) colorBBBBBB; FILLRGN(ML[06]>=KN/KZ and DW and SN[06]<4,MH[06],MH[06]-PS) color888888; FILLRGN(ML[07]>=KN/KZ and DW and SN[07]<4,MH[07],MH[07]-PS) colorBBBBBB; FILLRGN(ML[08]>=KN/KZ and DW and SN[08]<4,MH[08],MH[08]-PS) color888888; FILLRGN(ML[09]>=KN/KZ and DW and SN[09]<4,MH[09],MH[09]-PS) colorBBBBBB; FILLRGN(ML[10]>=KN/KZ and DW and SN[10]<4,MH[10],MH[10]-PS) color888888; DRAWTEXT(barpos=DK[01] and RT=0 and SN[01]<4,MH[01]-PS2,numtostr(MP[01],2)+'% ') ALIGN2 pxup8 color000000; DRAWTEXT(barpos=DK[02] and RT=0 and SN[02]<4,MH[02]-PS2,numtostr(MP[02],2)+'% ') ALIGN2 pxup8 color000000; DRAWTEXT(barpos=DK[03] and RT=0 and SN[03]<4,MH[03]-PS2,numtostr(MP[03],2)+'% ') ALIGN2 pxup8 color000000; DRAWTEXT(barpos=DK[04] and RT=0 and SN[04]<4,MH[04]-PS2,numtostr(MP[04],2)+'% ') ALIGN2 pxup8 color000000; DRAWTEXT(barpos=DK[05] and RT=0 and SN[05]<4,MH[05]-PS2,numtostr(MP[05],2)+'% ') ALIGN2 pxup8 color000000; DRAWTEXT(barpos=DK[06] and RT=0 and SN[06]<4,MH[06]-PS2,numtostr(MP[06],2)+'% ') ALIGN2 pxup8 color000000; DRAWTEXT(barpos=DK[07] and RT=0 and SN[07]<4,MH[07]-PS2,numtostr(MP[07],2)+'% ') ALIGN2 pxup8 color000000; DRAWTEXT(barpos=DK[08] and RT=0 and SN[08]<4,MH[08]-PS2,numtostr(MP[08],2)+'% ') ALIGN2 pxup8 color000000; DRAWTEXT(barpos=DK[09] and RT=0 and SN[09]<4,MH[09]-PS2,numtostr(MP[09],2)+'% ') ALIGN2 pxup8 color000000; DRAWTEXT(barpos=DK[10] and RT=0 and SN[10]<4,MH[10]-PS2,numtostr(MP[10],2)+'% ') ALIGN2 pxup8 color000000; DRAWTEXT(barpos=DK[01] and RT=1 and SN[01]<4,MH[01]-PS2,' '+numtostr(MP[01],2)+'%') ALIGN1 pxup8 color000000; DRAWTEXT(barpos=DK[02] and RT=1 and SN[02]<4,MH[02]-PS2,' '+numtostr(MP[02],2)+'%') ALIGN1 pxup8 color000000; DRAWTEXT(barpos=DK[03] and RT=1 and SN[03]<4,MH[03]-PS2,' '+numtostr(MP[03],2)+'%') ALIGN1 pxup8 color000000; DRAWTEXT(barpos=DK[04] and RT=1 and SN[04]<4,MH[04]-PS2,' '+numtostr(MP[04],2)+'%') ALIGN1 pxup8 color000000; DRAWTEXT(barpos=DK[05] and RT=1 and SN[05]<4,MH[05]-PS2,' '+numtostr(MP[05],2)+'%') ALIGN1 pxup8 color000000; DRAWTEXT(barpos=DK[06] and RT=1 and SN[06]<4,MH[06]-PS2,' '+numtostr(MP[06],2)+'%') ALIGN1 pxup8 color000000; DRAWTEXT(barpos=DK[07] and RT=1 and SN[07]<4,MH[07]-PS2,' '+numtostr(MP[07],2)+'%') ALIGN1 pxup8 color000000; DRAWTEXT(barpos=DK[08] and RT=1 and SN[08]<4,MH[08]-PS2,' '+numtostr(MP[08],2)+'%') ALIGN1 pxup8 color000000; DRAWTEXT(barpos=DK[09] and RT=1 and SN[09]<4,MH[09]-PS2,' '+numtostr(MP[09],2)+'%') ALIGN1 pxup8 color000000; DRAWTEXT(barpos=DK[10] and RT=1 and SN[10]<4,MH[10]-PS2,' '+numtostr(MP[10],2)+'%') ALIGN1 pxup8 color000000; kline(O,H,L,C,0);

向版主報告此篇 | 查IP位址
Old Post 2024-02-16 09:39
cgjj 現在離線 點選這裡查看 cgjj 的個人資料 點選這裡給 cgjj 傳送一條短訊 查找更多關於 cgjj 的文章 增加 cgjj 至你的好友列表 編輯/刪除訊息 引用回覆
cgjj
總版主

註冊日期: Oct 2003
來  自:
文章數量: 18091

此外~~

分鐘首K:=ISREGULARFBAR;
換日首K:=TRADEDATE<>REF(TRADEDATE,1);
歷史首K:=BARPOS=1;
DBCK:IF((DATATYPE=1 OR DATATYPE=12) AND STKLABEL='FITX1+',TIME=084600 OR TIME=150100,IF(DATATYPE=1 OR DATATYPE=11 OR DATATYPE=2,分鐘首K OR 換日首K,歷史首K));

此段這樣判斷,遇到30秒線之類的秒線,是會有問題的!!!
改為這樣會比較好

FK:=BARPOS=1 or ref(time,1)<084500 and time>=084500;
DBCK:=if(datatype=0 or datatype=12, FK, TradeDate<>REF(TradeDate,1) or IsRegularFBar);

向版主報告此篇 | 查IP位址
Old Post 2024-02-16 09:57
cgjj 現在離線 點選這裡查看 cgjj 的個人資料 點選這裡給 cgjj 傳送一條短訊 查找更多關於 cgjj 的文章 增加 cgjj 至你的好友列表 編輯/刪除訊息 引用回覆
Markchu7
資深會員

註冊日期: Nov 2007
來  自:
文章數量: 1496

感謝總版主指導!謝謝!

向版主報告此篇 | 查IP位址
Old Post 2024-02-17 08:31
Markchu7 現在離線 點選這裡查看 Markchu7 的個人資料 點選這裡給 Markchu7 傳送一條短訊 查找更多關於 Markchu7 的文章 增加 Markchu7 至你的好友列表 編輯/刪除訊息 引用回覆
Markchu7
資深會員

註冊日期: Nov 2007
來  自:
文章數量: 1496

重新整理後公式如下:
FK:=BARPOS=1 or ref(time,1)<084500 and time>=084500;
DBCK:=if(datatype=0 or datatype=12, FK, TradeDate<>REF(TradeDate,1) or IsRegularFBar);
CKSP:=BARSLAST(DBCK)+1,LINETHICK;

//N:=10; CC:=C; VV:=V; KK:=60;
//KL:=datacount-KK+1; KR:=datacount; if KR<KK then exit;
N:=10; CC:=C; VV:=V; KK:=60;
KL:=datacount-KK+1; KR:=datacount;
if KK>datacount then KK:=datacount;

KN:=barpos-KL; KZ:=KR-KL;
PH:=HHV(H,60); PH:=PH[datacount];
PL:=LLV(L,60); PL:=PL[datacount];
PS:=(PH-PL)/10;
VARIABLE:MH[N]=0,MZ[N]=0,ML[N]=0,MP[N]=0,DK[N]=0,SN[N]=0;
PS2:=PS/2; VZ:=0; MaxMZ:=0;
for i=1 to N do begin
MH[i]:=PH-PS*(i-1);
for k=KL to KR do begin
if CC[k]<=MH[i] and CC[k]>MH[i]-PS-PS*(i=N) then MZ[i]:=MZ[i]+VV[k];
end;
VZ:=VZ+MZ[i]; if MZ[i]>MaxMZ then MaxMZ:=MZ[i];
end;
for i=1 to N do begin
ML[i]:=MZ[i]/MaxMZ; MP[i]:=MZ[i]/VZ*100; DK[i]:=KL+floor(KZ*ML[i]);
end;
x:=sortpos(MZ,1,1,N);
for i=1 to N do SN[MZ[i]]:=i;
DW:=barpos>KL;
RT:=barpos<KL+KZ*0.25;


FILLRGN(ML[01]>=KN/KZ and DW and SN[01]<4,MH[01],MH[01]-PS) colorBBBBBB;
FILLRGN(ML[02]>=KN/KZ and DW and SN[02]<4,MH[02],MH[02]-PS) color888888;
FILLRGN(ML[03]>=KN/KZ and DW and SN[03]<4,MH[03],MH[03]-PS) colorBBBBBB;
FILLRGN(ML[04]>=KN/KZ and DW and SN[04]<4,MH[04],MH[04]-PS) color888888;
FILLRGN(ML[05]>=KN/KZ and DW and SN[05]<4,MH[05],MH[05]-PS) colorBBBBBB;
FILLRGN(ML[06]>=KN/KZ and DW and SN[06]<4,MH[06],MH[06]-PS) color888888;
FILLRGN(ML[07]>=KN/KZ and DW and SN[07]<4,MH[07],MH[07]-PS) colorBBBBBB;
FILLRGN(ML[08]>=KN/KZ and DW and SN[08]<4,MH[08],MH[08]-PS) color888888;
FILLRGN(ML[09]>=KN/KZ and DW and SN[09]<4,MH[09],MH[09]-PS) colorBBBBBB;
FILLRGN(ML[10]>=KN/KZ and DW and SN[10]<4,MH[10],MH[10]-PS) color888888;

DRAWTEXT(barpos=DK[01] and RT=0 and SN[01]<4,MH[01]-PS2,numtostr(MP[01],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=DK[02] and RT=0 and SN[02]<4,MH[02]-PS2,numtostr(MP[02],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=DK[03] and RT=0 and SN[03]<4,MH[03]-PS2,numtostr(MP[03],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=DK[04] and RT=0 and SN[04]<4,MH[04]-PS2,numtostr(MP[04],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=DK[05] and RT=0 and SN[05]<4,MH[05]-PS2,numtostr(MP[05],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=DK[06] and RT=0 and SN[06]<4,MH[06]-PS2,numtostr(MP[06],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=DK[07] and RT=0 and SN[07]<4,MH[07]-PS2,numtostr(MP[07],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=DK[08] and RT=0 and SN[08]<4,MH[08]-PS2,numtostr(MP[08],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=DK[09] and RT=0 and SN[09]<4,MH[09]-PS2,numtostr(MP[09],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=DK[10] and RT=0 and SN[10]<4,MH[10]-PS2,numtostr(MP[10],2)+'% ') ALIGN2 pxup8 color000000;
DRAWTEXT(barpos=DK[01] and RT=1 and SN[01]<4,MH[01]-PS2,' '+numtostr(MP[01],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=DK[02] and RT=1 and SN[02]<4,MH[02]-PS2,' '+numtostr(MP[02],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=DK[03] and RT=1 and SN[03]<4,MH[03]-PS2,' '+numtostr(MP[03],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=DK[04] and RT=1 and SN[04]<4,MH[04]-PS2,' '+numtostr(MP[04],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=DK[05] and RT=1 and SN[05]<4,MH[05]-PS2,' '+numtostr(MP[05],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=DK[06] and RT=1 and SN[06]<4,MH[06]-PS2,' '+numtostr(MP[06],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=DK[07] and RT=1 and SN[07]<4,MH[07]-PS2,' '+numtostr(MP[07],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=DK[08] and RT=1 and SN[08]<4,MH[08]-PS2,' '+numtostr(MP[08],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=DK[09] and RT=1 and SN[09]<4,MH[09]-PS2,' '+numtostr(MP[09],2)+'%') ALIGN1 pxup8 color000000;
DRAWTEXT(barpos=DK[10] and RT=1 and SN[10]<4,MH[10]-PS2,' '+numtostr(MP[10],2)+'%') ALIGN1 pxup8 color000000;

kline(O,H,L,C,0);

但會出現如附圖之警語!

Markchu7 附帶上了此圖片:

向版主報告此篇 | 查IP位址
Old Post 2024-02-17 08:41
Markchu7 現在離線 點選這裡查看 Markchu7 的個人資料 點選這裡給 Markchu7 傳送一條短訊 查找更多關於 Markchu7 的文章 增加 Markchu7 至你的好友列表 編輯/刪除訊息 引用回覆
Markchu7
資深會員

註冊日期: Nov 2007
來  自:
文章數量: 1496

094500以後才會正常!
煩請總版主在幫我看看!
謝謝!

Markchu7 附帶上了此圖片:

向版主報告此篇 | 查IP位址
Old Post 2024-02-17 08:43
Markchu7 現在離線 點選這裡查看 Markchu7 的個人資料 點選這裡給 Markchu7 傳送一條短訊 查找更多關於 Markchu7 的文章 增加 Markchu7 至你的好友列表 編輯/刪除訊息 引用回覆
cgjj
總版主

註冊日期: Oct 2003
來  自:
文章數量: 18091

引用:
最初由 Markchu7 發表
094500以後才會正常!
煩請總版主在幫我看看!
謝謝!



你沒有改正確!!!

這段
//N:=10; CC:=C; VV:=V; KK:=60;
//KL:=datacount-KK+1; KR:=datacount; if KR<KK then exit;
N:=10; CC:=C; VV:=V; KK:=60;
KL:=datacount-KK+1; KR:=datacount;
if KK>datacount then KK:=datacount;

應為
N:=10; CC:=C; VV:=V; KK:=60;
if KK>datacount then KK:=datacount;
KL:=datacount-KK+1; KR:=datacount; if KR<KK then exit;

向版主報告此篇 | 查IP位址
Old Post 2024-02-17 10:31
cgjj 現在離線 點選這裡查看 cgjj 的個人資料 點選這裡給 cgjj 傳送一條短訊 查找更多關於 cgjj 的文章 增加 cgjj 至你的好友列表 編輯/刪除訊息 引用回覆
Markchu7
資深會員

註冊日期: Nov 2007
來  自:
文章數量: 1496

可以了!
謝謝總版主!

向版主報告此篇 | 查IP位址
Old Post 2024-02-17 10:55
Markchu7 現在離線 點選這裡查看 Markchu7 的個人資料 點選這裡給 Markchu7 傳送一條短訊 查找更多關於 Markchu7 的文章 增加 Markchu7 至你的好友列表 編輯/刪除訊息 引用回覆
全部時間均為台灣時間, 現在時間為01:24 發表新主題    回覆主題
  上一主題   下一主題
顯示可列印版本 | 訂閱此主題

論壇跳轉:
主題評分:

論壇規定:
你不可以發表新主題
你不可以回覆文章
你不可以上傳附件
你不可以編輯自己的文章
HTML語法禁止
vB 語法核准
表情符號核准
貼圖語法[IMG]核准
 

本站所有內容未經作者授權禁止轉貼節錄, 發表言論僅供參考勿作為投資決策依據。瀏覽本站請使用 IE 5.5 以上版本, 最佳瀏覽解析度 1024 x 768 全彩。

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

簡愛洋行 製作 Copyright 2003-. All Rights Reserved.  聯絡我們