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

奇狐社區論壇 (http://www.chiefox.com.tw/bbs/index.php)
- 問題交流 (http://www.chiefox.com.tw/bbs/forumdisplay.php?forumid=28)
-- 請教等振幅K线 (http://www.chiefox.com.tw/bbs/showthread.php?threadid=4113)


由 2586 在 2005-10-22 02:12 發表:

請教等振幅K线

在大陸網站看到等振幅K线的原碼如下
ll:=l;
fo:=o;
fh:=h;
fl:=l;
fc:=c;
hh:=h;
<%
vc=ffl.vardata("fc")
n=ffl.vardata("n")/100
last=ubound(vc)
if last>0 then
vll=ffl.vardata("ll")
vhh=ffl.vardata("hh")
vo=ffl.vardata("fo")
vh=ffl.vardata("fh")
vl=ffl.vardata("fl")
redim y(last)
if vh(0)>vh(1) then
h=vh(0)
else
h=vh(1)
end if
if vl(0)<vl(1) then
l=vl(0)
else
l=vl(1)
end if

temp=0
temp2=1
for i=1 to last
temp1=temp
y(i)=temp2
if vh(i)>h then h=vh(i)
if vl(i)<l then l=vl(i)
temp=(h-l)/vc(temp2-1)
if temp>n and temp1<n or i=last then
temp=0
for j=temp2 to i
vc(j)=vc(i)
vo(j)=vo(temp2)
vll(j)=l
vhh(j)=h
if j=round((i+temp2)/2) then
vh(j)=h
vl(j)=l
else
vh(j)=(vc(i)+vo(temp2))/2
vl(j)=(vc(i)+vo(temp2))/2
end if
next
temp2=i+1
if i<last then
h=vh(temp2)
l=vl(temp2)
end if
end if
next
ffl.vardata("fo")=vo
ffl.vardata("fh")=vh
ffl.vardata("fl")=vl
ffl.vardata("fc")=vc
ffl.vardata("ll")=vll
ffl.vardata("hh")=vhh
end if
%>
STICKLINE(fc>=fo,fl,fh,3,0),COLORMAGENTA;
STICKLINE(fc>=fo,fc,fo,10,0),colorred;

STICKLINE(fc<fo,fl,fh,3,0),COLORCYAN;
STICKLINE(fc<fo,fc,fo,10,0),colorblue;
开:fo,linethick0;
高:hh,linethick0;
低:ll,linethick0;
收:fc,linethick0;

{等振幅K线,n=15}
想請教應如何應用


由 cgjj 在 2005-10-22 12:13 發表:

公式那來的就在那裡問
不是原作者很難了解其中的奧妙


由 2586 在 2005-10-22 19:12 發表:

請教等振幅K线

謝謝..


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


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

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