![]() |
總頁數 (3): « 1 2 [3] 在這個頁面顯示本主題全部的 41 個文章 |
奇狐社區論壇 (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=22396)
引用:
最初由 Markchu7 發表
PL1:MH[MPS[1]]-PS;
似乎這樣才正確,請指正!
謝謝!
引用:
最初由 cgjj 發表
原碼:
N:=10; CC:=C; VV:=V; KL:=SYSPARAM(2); KR:=SYSPARAM(3); 當沖:=(DATATYPE<>12 AND ISREGULARFBAR) or TRADEDATE<>REF(TRADEDATE,1) or BARPOS=1 OR (DATATYPE=12 AND TIME=084520); for i=datacount downto lbound(當沖) do begin if 當沖[i] and i>KL then begin KL:=i; break; end; end; KN:=barpos-KL; KZ:=KR-KL; PH:=HHV(H,KZ+1);PH:=PH[KR]; PL:=LLV(L,KZ+1);PL:=PL[KR]; 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; FILLRGN(ML[01]>=KN/KZ and KN>0,MH[01],MH[01]-PS) color555555; FILLRGN(ML[02]>=KN/KZ and KN>0,MH[02],MH[02]-PS) color888888; FILLRGN(ML[03]>=KN/KZ and KN>0,MH[03],MH[03]-PS) color555555; FILLRGN(ML[04]>=KN/KZ and KN>0,MH[04],MH[04]-PS) color888888; FILLRGN(ML[05]>=KN/KZ and KN>0,MH[05],MH[05]-PS) color555555; FILLRGN(ML[06]>=KN/KZ and KN>0,MH[06],MH[06]-PS) color888888; FILLRGN(ML[07]>=KN/KZ and KN>0,MH[07],MH[07]-PS) color555555; FILLRGN(ML[08]>=KN/KZ and KN>0,MH[08],MH[08]-PS) color888888; FILLRGN(ML[09]>=KN/KZ and KN>0,MH[09],MH[09]-PS) color555555; FILLRGN(ML[10]>=KN/KZ and KN>0,MH[10],MH[10]-PS) color888888; kline(O,H,L,C,0); RT:=barpos<KL+KZ*0.25; DRAWTEXT(barpos=KL+floor(KZ*ML[01]) and RT=0,MH[01]-PS2,numtostr(MP[01],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[02]) and RT=0,MH[02]-PS2,numtostr(MP[02],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[03]) and RT=0,MH[03]-PS2,numtostr(MP[03],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[04]) and RT=0,MH[04]-PS2,numtostr(MP[04],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[05]) and RT=0,MH[05]-PS2,numtostr(MP[05],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[06]) and RT=0,MH[06]-PS2,numtostr(MP[06],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[07]) and RT=0,MH[07]-PS2,numtostr(MP[07],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[08]) and RT=0,MH[08]-PS2,numtostr(MP[08],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[09]) and RT=0,MH[09]-PS2,numtostr(MP[09],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[10]) and RT=0,MH[10]-PS2,numtostr(MP[10],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[01]) and RT=1,MH[01]-PS2,' '+numtostr(MP[01],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[02]) and RT=1,MH[02]-PS2,' '+numtostr(MP[02],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[03]) and RT=1,MH[03]-PS2,' '+numtostr(MP[03],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[04]) and RT=1,MH[04]-PS2,' '+numtostr(MP[04],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[05]) and RT=1,MH[05]-PS2,' '+numtostr(MP[05],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[06]) and RT=1,MH[06]-PS2,' '+numtostr(MP[06],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[07]) and RT=1,MH[07]-PS2,' '+numtostr(MP[07],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[08]) and RT=1,MH[08]-PS2,' '+numtostr(MP[08],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[09]) and RT=1,MH[09]-PS2,' '+numtostr(MP[09],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[10]) and RT=1,MH[10]-PS2,' '+numtostr(MP[10],2)+'%') ALIGN1 pxup8 coloryellow;
__________________
榮耀天 感恩協助^^
幸福傳奇總是有你我...
祐~
引用:
最初由 alr8356 發表
哈囉
因灰色條柱會蓋住線(均線等)
想詢問總版主
1.還有其他顯示方法嗎^^
2.只想顯示當天價量
引用:
最初由 cgjj 發表
這公式並沒有添加均線唷!
您若要添加,請添加於後,不要加於前
後畫的會疊在先畫的上面!!!
__________________
榮耀天 感恩協助^^
幸福傳奇總是有你我...
祐~
引用:
最初由 alr8356 發表
哈哈 我聽懂了 我把它放在其它前面...
那我可以請您幫改 只顯示當天就好嗎
引用:
最初由 cgjj 發表
不用改呀! 本來就只會有當天的(沒多日的)~~
__________________
榮耀天 感恩協助^^
幸福傳奇總是有你我...
祐~
引用:
最初由 alr8356 發表
不知道會不會是因為我看外期的關係
拉大時 條柱就會跑
引用:
最初由 cgjj 發表
原碼:
N:=10; CC:=C; VV:=V; KL:=SYSPARAM(2); KR:=SYSPARAM(3)-(SYSPARAM(3)=datacount); 當沖:=(DATATYPE<>12 AND ISREGULARFBAR) or TRADEDATE<>REF(TRADEDATE,1) or BARPOS=1 OR (DATATYPE=12 AND TIME=084520); for i=datacount downto lbound(當沖) do begin if 當沖[i] and i>KL then begin KL:=i; break; end; end; KN:=barpos-KL; KZ:=KR-KL; PH:=HHV(H,KZ+1);PH:=PH[KR]; PL:=LLV(L,KZ+1);PL:=PL[KR]; PS:=(PH-PL)/10; VARIABLE:MH[N]=0,MZ[N]=0,ML[N]=0,MP[N]=0,MPS[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; MPS[i]:=MP[i]; end; x:=sortpos(MPS,1,1,N); for i=4 to N do ML[MPS[i]]:=0; FILLRGN(ML[01]>=KN/KZ and KN>0,MH[01],MH[01]-PS) color555555; FILLRGN(ML[02]>=KN/KZ and KN>0,MH[02],MH[02]-PS) color888888; FILLRGN(ML[03]>=KN/KZ and KN>0,MH[03],MH[03]-PS) color555555; FILLRGN(ML[04]>=KN/KZ and KN>0,MH[04],MH[04]-PS) color888888; FILLRGN(ML[05]>=KN/KZ and KN>0,MH[05],MH[05]-PS) color555555; FILLRGN(ML[06]>=KN/KZ and KN>0,MH[06],MH[06]-PS) color888888; FILLRGN(ML[07]>=KN/KZ and KN>0,MH[07],MH[07]-PS) color555555; FILLRGN(ML[08]>=KN/KZ and KN>0,MH[08],MH[08]-PS) color888888; FILLRGN(ML[09]>=KN/KZ and KN>0,MH[09],MH[09]-PS) color555555; FILLRGN(ML[10]>=KN/KZ and KN>0,MH[10],MH[10]-PS) color888888; kline(O,H,L,C,0); RT:=barpos<KL+KZ*0.25; DRAWTEXT(barpos=KL+floor(KZ*ML[01]) and RT=0,MH[01]-PS2,numtostr(MP[01],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[02]) and RT=0,MH[02]-PS2,numtostr(MP[02],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[03]) and RT=0,MH[03]-PS2,numtostr(MP[03],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[04]) and RT=0,MH[04]-PS2,numtostr(MP[04],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[05]) and RT=0,MH[05]-PS2,numtostr(MP[05],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[06]) and RT=0,MH[06]-PS2,numtostr(MP[06],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[07]) and RT=0,MH[07]-PS2,numtostr(MP[07],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[08]) and RT=0,MH[08]-PS2,numtostr(MP[08],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[09]) and RT=0,MH[09]-PS2,numtostr(MP[09],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[10]) and RT=0,MH[10]-PS2,numtostr(MP[10],2)+'% ') ALIGN2 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[01]) and RT=1,MH[01]-PS2,' '+numtostr(MP[01],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[02]) and RT=1,MH[02]-PS2,' '+numtostr(MP[02],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[03]) and RT=1,MH[03]-PS2,' '+numtostr(MP[03],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[04]) and RT=1,MH[04]-PS2,' '+numtostr(MP[04],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[05]) and RT=1,MH[05]-PS2,' '+numtostr(MP[05],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[06]) and RT=1,MH[06]-PS2,' '+numtostr(MP[06],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[07]) and RT=1,MH[07]-PS2,' '+numtostr(MP[07],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[08]) and RT=1,MH[08]-PS2,' '+numtostr(MP[08],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[09]) and RT=1,MH[09]-PS2,' '+numtostr(MP[09],2)+'%') ALIGN1 pxup8 coloryellow; DRAWTEXT(barpos=KL+floor(KZ*ML[10]) and RT=1,MH[10]-PS2,' '+numtostr(MP[10],2)+'%') ALIGN1 pxup8 coloryellow;
__________________
榮耀天 感恩協助^^
幸福傳奇總是有你我...
祐~
引用:
最初由 alr8356 發表
版主 我可以請你幫改 只要最大量區就好了....
原碼:
N:=10; CC:=C; VV:=V; KL:=SYSPARAM(2); KR:=SYSPARAM(3)-(SYSPARAM(3)=datacount); 當沖:=(DATATYPE<>12 AND ISREGULARFBAR) or TRADEDATE<>REF(TRADEDATE,1) or BARPOS=1 OR (DATATYPE=12 AND TIME=084520); for i=datacount downto lbound(當沖) do begin if 當沖[i] and i>KL then begin KL:=i; break; end; end; KN:=barpos-KL; KZ:=KR-KL; PH:=HHV(H,KZ+1);PH:=PH[KR]; PL:=LLV(L,KZ+1);PL:=PL[KR]; PS:=(PH-PL)/10; VARIABLE:MH[N]=0,MZ[N]=0,ML[N]=0; PS2:=PS/2; VZ:=0; MaxMZ:=0;Maxi:=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 begin MaxMZ:=MZ[i]; Maxi:=i; end; end; MP:=MaxMZ/VZ*100; FILLRGN(KN/KZ<=1 and KN>0,MH[Maxi],MH[Maxi]-PS) color555555; kline(O,H,L,C,0); DRAWTEXT(barpos=KL+KZ,MH[Maxi]-PS2,' '+numtostr(MP,2)+'% ') ALIGN2 pxup8 coloryellow;
引用:
最初由 cgjj 發表
原碼:
N:=10; CC:=C; VV:=V; KL:=SYSPARAM(2); KR:=SYSPARAM(3)-(SYSPARAM(3)=datacount); 當沖:=(DATATYPE<>12 AND ISREGULARFBAR) or TRADEDATE<>REF(TRADEDATE,1) or BARPOS=1 OR (DATATYPE=12 AND TIME=084520); for i=datacount downto lbound(當沖) do begin if 當沖[i] and i>KL then begin KL:=i; break; end; end; KN:=barpos-KL; KZ:=KR-KL; PH:=HHV(H,KZ+1);PH:=PH[KR]; PL:=LLV(L,KZ+1);PL:=PL[KR]; PS:=(PH-PL)/10; VARIABLE:MH[N]=0,MZ[N]=0,ML[N]=0; PS2:=PS/2; VZ:=0; MaxMZ:=0;Maxi:=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 begin MaxMZ:=MZ[i]; Maxi:=i; end; end; MP:=MaxMZ/VZ*100; FILLRGN(KN/KZ<=1 and KN>0,MH[Maxi],MH[Maxi]-PS) color555555; kline(O,H,L,C,0); DRAWTEXT(barpos=KL+KZ,MH[Maxi]-PS2,' '+numtostr(MP,2)+'% ') ALIGN2 pxup8 coloryellow;
__________________
榮耀天 感恩協助^^
幸福傳奇總是有你我...
祐~
全部時間均為台灣時間, 現在時間為06:34 | 總頁數 (3): « 1 2 [3] 在這個頁面顯示本主題全部的 41 個文章 |
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved.