![]() |
在這個頁面顯示本主題全部的 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=7394)
幫忙修改公式
您好!
我在大陸網站看到一個公式,匯入之後,不知為何有的股票會有圖形,例如2303、2352,但大部份的股票是沒有圖形的,不知誰能解釋這原因出在哪裡?並能幫我修改一下,麻煩大家了,感激不盡!
INPUT:N(10,1,100);
fc:=c;
fo:=o;
cc:0*c,LINETHICK0;
oo:0*c,LINETHICK0;
t1:=0*c;
t2:=0*c;
for i=1 to datacount do begin
if i=1 and fc[i]>fo[i] then
cc[i]:=fc[i];
oo[i]:=fc[i];
if i=1 and fc[i]<fo[i] then
cc[i]:=fc[i];
oo[i]:=fc[i];
if i>1 then
cc[i]:=cc[i-1];
oo[i]:=oo[i-1];
if i>1 and fc[i]>cc[i]*(1+n/100) then begin
cc[i]:=cc[i-1]*(1+n/100);
oo[i]:=cc[i-1];
end;
if i>1 and fc[i]<oo[i]/(1+n/100) then begin
oo[i]:=oo[i-1]/(1+n/100);
cc[i]:=oo[i-1];
end;
if oo[i]=oo[i-1] then
t1[i]:=t1[i-1]+1;
if cc[i]=cc[i-1] then
t2[i]:=t2[i-1]+1;
end;
o1:=ref(oo,t1+1);
c1:=ref(cc,t2+1);
STICKLINE(c1=oo,cc,oo,8,1)COLORRED;
STICKLINE(o1=cc,cc,oo,8,1)COLORCYAN;
INPUT:N(10,1,100);
fc:= c;
fo:= o;
cc:0*c,LINETHICK0;
oo:0*c,LINETHICK0;
t1:=0*c;
t2:=0*c;
////////////////////////////////////////////////
下限:= lbound(fc) ;
cc[下限] := fc[下限];
oo[下限] := fc[下限];
for i = 下限 + 1 to datacount do begin
cc[i]:=cc[i-1];
oo[i]:=oo[i-1];
倍率:= 1 + n / 100 ;
if fc[i]> ( cc[i-1] * 倍率) then begin
cc[i]:=cc[i-1] * 倍率;
oo[i]:=cc[i-1];
end;
if fc[i]< ( oo[i-1] / 倍率 ) then begin
oo[i]:= oo[i-1] / 倍率;
cc[i]:= oo[i-1];
end;
if oo[i]=oo[i-1] then t1[i]:=t1[i-1]+1; // 這個就是欲實現奇狐的 barslast 函數
if cc[i]=cc[i-1] then t2[i]:=t2[i-1]+1;
end;
o1:=ref(oo,t1+1);
c1:=ref(cc,t2+1);
STICKLINE(c1=oo,cc,oo,8,1)COLORRED;
STICKLINE(o1=cc,cc,oo,8,1)COLORCYAN;
/// [PS] 華碩 2357 仍會出錯 應該是起始值的關係 有空在找
全部時間均為台灣時間, 現在時間為23:39 | 在這個頁面顯示本主題全部的 2 個文章 |
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved.