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

奇狐社區論壇 (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=2973)


由 ifuian 在 2005-04-21 19:56 發表:

[問題]這一句公式如何寫

請教前輩.
我想計算一個價位:....
而這價位的"起算價".
必須向前引用上一次條件成立(ZIG轉向成立點位置).
請教這"起算價"的價位要如何計算....
有一點糊塗了.只好請教各位前輩..
謝謝

__________________
人外有人 天外有天 不懼不貪 亦富亦安


由 yhcheng 在 2005-04-21 21:23 發表:

gg:zig(c,5);
kk:=gg<ref(gg,1) and ref(gg,1) >ref(gg,2);
kk1:=gg>ref(gg,1) and ref(gg,1) <ref(gg,2);
bb:=0*c;
bb1:=0*c;
hac[1]:=0;
attb:=hac[1];
attb1:=hac[1];
attbn:=0*c;
attb1n:=0*c;

for i=datacount downto 5 do
begin
if kk[i]=1 then bb[i-1]:=1;
if bb[i-1]=1 then attb:=attb+1;
if bb[i-1]=1 then attbn[i-1]:=attb;
if kk1[i]=1 then bb1[i-1]:=1;
if bb1[i-1]=1 then attb1:=attb1+1;
if bb1[i-1]=1 then attb1n[i-1]:=attb1;
end;
bb;
bb1;

hc:if(bb=1 and attbn=1,c,0),linethick5;
lc:if(bb1=1 and attb1n=1,c,0);


hc2:if(bb=1 and attbn=2,c,0),linethick5;
lc2:if(bb1=1 and attb1n=2,c,0);


hc10:if(bb=1 and attbn=10,c,0),linethick5;
lc10:if(bb1=1 and attb1n=10,c,0);

(太壞了,把我全忘了)
REF(gg,BARSLAST(attbn=1))
REF(gg,BARSLAST(attbn=5))
REF(gg,BARSLAST(attbn=10))
....
REF(gg,BARSLAST(attb1n=1))
REF(gg,BARSLAST(attb1n=5))
REF(gg,BARSLAST(attb1n=10))



由 ifuian 在 2005-04-21 22:54 發表:

不是這樣
我要的是例如:
KY:ZIG(4,5),COLORGREEN,LINETHICK2;
{ ZIG最高價反轉 }

前波Z字反轉點:REF(BARSLAST(KY),KY);(這句不對)

{向前引用上一次條件成立(ZIG轉向成立點位置).這句不懂如何表達}
問題在於要如何引用"上一次條件成立(ZIG轉向成立點位置)"???
?????????????????????????????????????????????
有那位前輩指點迷津....拜託了

__________________
人外有人 天外有天 不懼不貪 亦富亦安


由 cgjj 在 2005-04-22 01:11 發表:

KY:ZIG(4,5),COLORGREEN,LINETHICK2;
NPOS:=KY>ref(KY,1) and KY>refx(KY,1) or KY<ref(KY,1) and KY<refx(KY,1);
前波Z字反轉點:REF(KY,BARSLAST(NPOS)) LINETHICK0;


由 yhcheng 在 2005-04-22 09:05 發表:

REF(gg,BARSLAST(attbn=1));
REF(gg,BARSLAST(attbn=5));
REF(gg,BARSLAST(attbn=10));
// ........
REF(gg,BARSLAST(attbn=100));

REF(gg,BARSLAST(attb1n=1));
REF(gg,BARSLAST(attb1n=5));
REF(gg,BARSLAST(attb1n=10));
// ........
REF(gg,BARSLAST(attb1n=100));


由 ifuian 在 2005-04-22 09:25 發表:

贊成

謝謝總版主.也謝謝yhchang幫忙
不過總版主的方式較適用.總之謝謝兩位的幫忙
感謝感謝

__________________
人外有人 天外有天 不懼不貪 亦富亦安


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


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

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