 |
steven
資深會員
註冊日期: Mar 2004
來 自:
文章數量: 270 |
幫忙修改公式
您好!
我在大陸網站看到一個公式,匯入之後,不知為何有的股票會有圖形,例如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;
|
|
向版主報告此篇 |  |
|
2007-03-28 22:47 |
|
|
|  |
 |
alpha
資深會員
註冊日期: Oct 2006
來 自:
文章數量: 225 |
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 仍會出錯 應該是起始值的關係 有空在找
|
最後由 alpha 在 2007-03-29 01:01 編輯 |
向版主報告此篇 |  |
|
2007-03-29 00:49 |
|
|
|  |
本站所有內容未經作者授權禁止轉貼節錄, 發表言論僅供參考勿作為投資決策依據。瀏覽本站請使用 IE 5.5 以上版本, 最佳瀏覽解析度 1024 x 768 全彩。
|
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved. 聯絡我們
|