![]() |
¦b³oÓ¶±Åã¥Ü¥»¥DÃD¥þ³¡ªº 12 Ӥ峹 |
©_ª°ªÀ°Ï½×¾Â (http://www.chiefox.com.tw/bbs/index.php)
- °ÝÃD¥æ¬y (http://www.chiefox.com.tw/bbs/forumdisplay.php?forumid=28)
-- ¦p¦ó¼g¤U±¥æ©ö°T¸¹(«ü¼Ð) (http://www.chiefox.com.tw/bbs/showthread.php?threadid=15472)
¦p¦ó¼g¤U±¥æ©ö°T¸¹(«ü¼Ð)
º¥ý§Ú¥ý¥Î²³æ¤è¦¡´yz
Ãþ¦ü¶Ç²Îµ{¦¡»y¨¥¤è¦¡
if CondA then
Result1 =1
//¥Dn¬O§Æ±æ¦b¦¹³B¤£¥Î¦A¥h°w¹ï ¨ä¥Lª¬ªp¹Bºâ ª½±µ¸õ¨ì«á± Result¿é¥X
else
if CondB then
//¥Dn¬O§Æ±æ¦b¦¹³B¤£¥Î¦A¥h°w¹ïCondC¥h§@§P©w©Î¨ä¥L¹Bºâ
Result2=1
else
if CondC then
Result3=0
else
Result3=1
end if
end if
end if
Reulst = Result1 and Result2 and Result3
·|³o¼Ë§@¬O§Æ±æ¯àÁ×§K«ü¼Ð¦b¹Bºâ¤¤
²¤Ö¤£¥²nªº¹Bºâ
(¦b§Ú¹ê»Ú«ü¼Ð¤¤ n¥Î«Ü¦h¼hªºif)
¥i¥HÁ|Ó¹ê¨Ò»¡©ú¦b©_ª°¤¤¸Ó¦p¦ó§¹¦¨¶Ü
ÁÂÁÂ
¦^ÂÐ: ¦p¦ó¼g¤U±¥æ©ö°T¸¹(«ü¼Ð)
¤Þ¥Î:
³Ìªì¥Ñ newuser µoªí
º¥ý§Ú¥ý¥Î²³æ¤è¦¡´yz
Ãþ¦ü¶Ç²Îµ{¦¡»y¨¥¤è¦¡
if CondA then
Result1 =1
//¥Dn¬O§Æ±æ¦b¦¹³B¤£¥Î¦A¥h°w¹ï ¨ä¥Lª¬ªp¹Bºâ ª½±µ¸õ¨ì«á± Result¿é¥X
else
if CondB then
//¥Dn¬O§Æ±æ¦b¦¹³B¤£¥Î¦A¥h°w¹ïCondC¥h§@§P©w©Î¨ä¥L¹Bºâ
Result2=1
else
if CondC then
Result3=0
else
Result3=1
end if
end if
end if
Reulst = Result1 and Result2 and Result3
·|³o¼Ë§@¬O§Æ±æ¯àÁ×§K«ü¼Ð¦b¹Bºâ¤¤
²¤Ö¤£¥²nªº¹Bºâ
(¦b§Ú¹ê»Ú«ü¼Ð¤¤ n¥Î«Ü¦h¼hªºif)
¥i¥HÁ|Ó¹ê¨Ò»¡©ú¦b©_ª°¤¤¸Ó¦p¦ó§¹¦¨¶Ü
ÁÂÁÂ
Á`ª©¥D±z¦n
ÁÂÁ±z¦b¥t¤@½g»¡©ú
¦ý¬O´N§Ú©Òª¾
if cond then
¤¤ªºcond¦n¹³¤£¯à¥ÎÃþ¦ü
CROSS(MA1, MA2) ©Î¬O HHV(High,5)>CLOSE+10³o¼Ëªº§PÂ_¦¡
¨º¦pªG¬O±_ª¬if then else
¦b©_ª°¤¤¸Ó«ç¼Ë³B²z
ÁÂÁÂ
¤Þ¥Î:
³Ìªì¥Ñ newuser µoªí
Á`ª©¥D±z¦n
ÁÂÁ±z¦b¥t¤@½g»¡©ú
¦ý¬O´N§Ú©Òª¾
if cond then
¤¤ªºcond¦n¹³¤£¯à¥ÎÃþ¦ü
CROSS(MA1, MA2) ©Î¬O HHV(High,5)>CLOSE+10³o¼Ëªº§PÂ_¦¡
¨º¦pªG¬O±_ª¬if then else
¦b©_ª°¤¤¸Ó«ç¼Ë³B²z
ÁÂÁÂ
½d¨Ò:
¨Ì¾Ú HHV(High,5)>CLOSE+10 ±ø¥ó¬O§_¦¨¥ß, ¨M©wn¨ú¥Î¨ºÓÈ
M1:MA(C,10);
M2:MA(C,20);
X: if( HHV(High,5)>CLOSE+10, M1, M2 );
Yn¦p¦P²Ä¤@ºØ°µªkºâ, ©_ª°¥ç¥i
¨Ò¦p¤U±°j°é¤ºªº¤º®e, §Y¬O¤@¦¸¶]¤@®Ú
ì½X:
OO:O; CC:C; for i=1 to datacount do begin if OO[i]>CC[i] then begin ..........²Å¦X±ø¥ó¤§³B²z.......... end else begin ..........¤£²Å¦X±ø¥ó¤§³B²z.......... end; end;
Á`ª©¥DÁÂÁ±z¸Ñ»¡
§Ú·Q§ÚÁ|²M·¡¤@ÂI¨Ò¤l½Ð±zÀ°¦£¦n¤F
°²³]§Ú¦³¤U±´XÓÅܼÆ
¦h¤èÁͶսL:=¦h¤èÁͶզ¨¥ß;(©w¸q¤£¼g¥X)
¦h¤è½L¾ã½L:=¦h¤è½L¾ã¦¨¥ß;(©w¸q¤£¼g¥X)
//¦h³æ¶i³õªí¥Ü¦p즳ªÅ³æÂন¦h³æ
¦h³æ¶i³õ±ø¥ó:=¦h³æ¶i³õ¦¨¥ß;(©w¸q¤£¼g¥X)
//´î½Xªí¥Ü¦b¦h¤è®É¦p¦³ªÅ³æ´N´î½X
//¦p즳¦h³æ¤£°Ê§@
´î½X±ø¥ó:=´î½X¦¨¥ß;(©w¸q¤£¼g¥X)
//ªÅ³æ¥X³õªí¥ÜªÅ¤â ¤£¶i¦h³æ
ªÅ³æ¥X³õ±ø¥ó:=ªÅ³æ¥X³õ¦¨¥ß;( ©w¸q¤£¼g¥X)
if ¦h¤èÁͶսL then
if kd<80 then
if macd>0 then
if ¦h³æ¶i³õ±ø¥ó then
¦h³æ:=true;
else if ´î½X±ø¥ó then
ªÅ³æ´î½X:=true;
else if ªÅ³æ¥X³õ±ø¥ó then
ªÅ¤â:=true;
else //macd<=0
if ¦h³æ¶i³õ±ø¥ó and ma5>ma10 then
¦h³æ:=true;
else if ´î½X±ø¥ó and ma5>ma10 then
ªÅ³æ´î½X:=true;
else if ªÅ³æ¥X³õ±ø¥ó and ma5>ma10 then
ªÅ¤â:=true;
else
¤£°Ê§@:=true;
end if; // macd>0 then
else if KD>20 and KD<80 then
//³oÃ䦳Ãþ¦ü¤W±KD<20 ¦ý¦³³¡¥÷ÅܤÆ
else if KD>80 then
//³oÃ䦳Ãþ¦ü¤W±KD<20 ¦ý¦³³¡¥÷ÅܤÆ
end if;//kd<20
else if ¦h¤è½L¾ã½L then
//³oÃ䦳Ãþ¦ü¤W±¦h¤èÁͶսL
else //¨ä¥L½L
//³oÃ䦳Ãþ¦ü¤W±¦h¤èÁͶսL
end if; //¦h¤èÁͶսL
¹ê»Ú¤W§Úªº§P©w±_ª¬if¦³«Ü¦hª¬ªp ¥B¦³«Ü¦h¼h(¤£¬O ³o¨Ò¤l³o¼Ë¤~¤@ºØª¬ªpkd<20 §Ú¹ê»Ú¥i¯àKD<20 + CLOSE>HHV(HIGH,10)+MA5>MA100 ³o¼Ë3ºØ²Õ¦X°ò¥»¤W¦Ü¤Ö¦³8Ó¥i¯àÈ)
¦P®É³o¨Çª¬ªpì«h¤W¨S¦³©T©w¤@ºØ¼Ò¦¡
¦pªGn¼g¦¨¤@°ï«Ü¶Ã
§Ú¬O§Æ±æ·í¦h¤èÁͶսL¦¨¥ß«á
«á±¨ä¥L¦h¤è½L¾ã½L ¨ä¥L½L³¡¥÷´N¤£n¦A°õ¦æ¤F
KD<20¦¨¥ß¬Û¹ïªºKD>=20¥H¥~ª¬ªp´N¤£¦A°õ¦æ
(¶Ç²Îµ{¦¡¬O³o¼Ë)
¥i¬O¥Î±z«e±Á|ªºif(a, 1, if(b, 1, 0))
³o¼Ë¹ï§Ú¨Ó»¡
¤@¨Ó§ÚºûÅ@¤£¦nºûÅ@
¤G¨Ó³o¼Ëªºif¤Óªø¤F
§Ú¦³³¡¥÷ª¬ªp¦³ÂI½ÆÂø
¤£ª¾³o¼ËÁ`ª©¥D±z©úÁA¶Ü
§Æ±æ±z¨ó§U
§Ú·Q§Ú¥u¬O§Æ±æ¬Y¨Çµ{¦¡³¡¥÷¤£n³Q°õ¦æ
ª½±µ¸õ¹L¥h
³o¼Ë©M¬Y¤@¦æµ{¦¡¬O¥ý³Q©Ò¦³k´Î°õ¦æ©Î¬O¥þ³¡µ{¦¡°õ¦æ¤~¤U¤@k´Î¦³¼vÅT¶Ü?
ÁÂÁÂ
¥ý¾ã²z¤@¤U
ì½X:
if ¦h¤èÁͶսL then
if kd<80 then
if macd>0 then
if ¦h³æ¶i³õ±ø¥ó then
¦h³æ:=true; //<=== ¦h³æ1
else if ´î½X±ø¥ó then
ªÅ³æ´î½X:=true;
else if ªÅ³æ¥X³õ±ø¥ó then
ªÅ¤â:=true;
else //macd<=0
if ¦h³æ¶i³õ±ø¥ó and ma5>ma10 then
¦h³æ:=true; //<=== ¦h³æ2
else if ´î½X±ø¥ó and ma5>ma10 then
ªÅ³æ´î½X:=true;
else if ªÅ³æ¥X³õ±ø¥ó and ma5>ma10 then
ªÅ¤â:=true;
else
¤£°Ê§@:=true;
end if; // macd>0 then
else if KD>20 and KD<80 then
//³oÃ䦳Ãþ¦ü¤W±KD<20 ¦ý¦³³¡¥÷ÅܤÆ
else if KD>80 then
//³oÃ䦳Ãþ¦ü¤W±KD<20 ¦ý¦³³¡¥÷ÅܤÆ
end if;//kd<20
else if ¦h¤è½L¾ã½L then
//³oÃ䦳Ãþ¦ü¤W±¦h¤èÁͶսL
else //¨ä¥L½L
//³oÃ䦳Ãþ¦ü¤W±¦h¤èÁͶսL
end if;
¥H¤W¥Ø«e¬Ý¨ì¦³¦C¥Xªº¦h³æ, ¥i²¤Æ¬°:
¦h³æ1:= kd<80 and macd>0 and ¦h³æ¶i³õ±ø¥ó;
¦h³æ2:= kd<80 and macd<=0 and ¦h³æ¶i³õ±ø¥ó and and ma5>ma10;
¦h³æ:=¦h³æ1 or ¦h³æ2;
Á`ª©¥DÁÂÁ±z¤F
½Ð±Ð±z
1.ì¨Ó§Úªº¼gªk¬O¥i¦æªº¶Ü?
§Ú¤§«e¼g¥t¤@«ü¼Ð®É
¥Î³o¼Ë¼g¦n¹³¤S°ÝÃD
¬O¤£¬O¤@©wn¥Î if(conditionA, if(conditionB, resultB, resultC), resultA)³o¼Ë
¤£¯à¥Î§Ú«e±¨º¨Ò¤l¼gªk
¦]¬°conditionA, conditionB¬O¼Æ¦CÈ(¹³kdÈ)
¥Î§Ú¨º¼gªkn¬O¼ÆÈ¤~¥i¥H
2.´N±zªº¨Ò¤l
¦h³æ1:= kd<80 and macd>0 and ¦h³æ¶i³õ±ø¥ó;
¦h³æ2:= kd<80 and macd<=0 and ¦h³æ¶i³õ±ø¥ó and and ma5>ma10;
¦pªGKD>80¬O¤£¬O«á±ªº³¡¥÷´N¤£¤ñ¸û¤F
ª½±µ¦^false?
±z¨¯W¤F
(§Ú¨ì²{¦bÁÙ¬O¤£¬O§Ë«ÜÀ´³o¼Æ¦C°ÝÃD)
¤Þ¥Î:
³Ìªì¥Ñ newuser µoªí
¥H¤W¥Ø«e¬Ý¨ì¦³¦C¥Xªº¦h³æ, ¥i²¤Æ¬°:
¦h³æ1:= kd<80 and macd>0 and ¦h³æ¶i³õ±ø¥ó;
¦h³æ2:= kd<80 and macd<=0 and ¦h³æ¶i³õ±ø¥ó and and ma5>ma10;
¦h³æ:=¦h³æ1 or ¦h³æ2;
Á`ª©¥DÁÂÁ±z¤F
½Ð±Ð±z
1.ì¨Ó§Úªº¼gªk¬O¥i¦æªº¶Ü?
§Ú¤§«e¼g¥t¤@«ü¼Ð®É
¥Î³o¼Ë¼g¦n¹³¤S°ÝÃD
¬O¤£¬O¤@©wn¥Î if(conditionA, if(conditionB, resultB, resultC), resultA)³o¼Ë
¤£¯à¥Î§Ú«e±¨º¨Ò¤l¼gªk
¦]¬°conditionA, conditionB¬O¼Æ¦CÈ(¹³kdÈ)
¥Î§Ú¨º¼gªkn¬O¼ÆÈ¤~¥i¥H
2.´N±zªº¨Ò¤l
¦h³æ1:= kd<80 and macd>0 and ¦h³æ¶i³õ±ø¥ó;
¦h³æ2:= kd<80 and macd<=0 and ¦h³æ¶i³õ±ø¥ó and and ma5>ma10;
¦pªGKD>80¬O¤£¬O«á±ªº³¡¥÷´N¤£¤ñ¸û¤F
ª½±µ¦^false?
±z¨¯W¤F
(§Ú¨ì²{¦bÁÙ¬O¤£¬O§Ë«ÜÀ´³o¼Æ¦C°ÝÃD)
¤Þ¥Î:
³Ìªì¥Ñ cgjj µoªí
ì¨Ó±zªº¼gªk¤]¬O¥i¦æ
¦ý¥²»Ý·f°t°j°é, ¤@¦¸ºâ¤@®Úªº¤è¦¡¶i¦æ (¦p¦P«e±½d¨Ò¤@¼Ë)
KD>80 ¨º»ò ¦h³æ1©M¦h³æ2 §PÂ_¦¡´N¤£·|¦¨¥ß
¤]´N¬O ¦h³æ:=¦h³æ1 or ¦h³æ2; ³o±ø¥ó¦¡µ²ªG¤£¦¨¥ß(Ȭ°¹s)
¤Þ¥Î:
³Ìªì¥Ñ newuser µoªí
À³¸Ó¬O§Ú¨S¥J²Ó½T»{§ÚÁ|ªº¨Ò¤l
¦b¹ê»Ú¤¤¤£·|¦³³o¼Ëª¬ªp
§Ú²{¦bªº§@ªk´N¬OÃþ¦ü±z³o¤è¦¡
¥i¬O³o§@ªk·Pı¦³¤@°ÝÃD´N¬O·í§Ú±ø¥ó«Ü¦h®É
©_ª°·|¹ï¨C¤@¦h³æ1 ¦h³æ2 ¦h³æ3...¦h³æn
³£¶]¤@¦¸¬O§a
§Ú´N¬O¤£§Æ±æ³o¼Ë ¦]¬°¦b¥Îif else®É
¥un¬Y¤@±ø¥ó¦¨¥ß¨ä¥Lªºª¬ªp³£¤£·|¦A¦Ò¼{
¦ý¬O¥Î¦h³æ1 ¦h³æ2 ¦h³æ3...¦h³æn¤ñ¦p¨C¤@¶µ³£¦³KD>20³o±ø¥ó ¨º¥L¨C¤@¦¸³£n¦h¤ñ¤@¦¸¤£¬O¶Ü ÁÙ¦³¤@¨Ç¤£»Ýn¦Ò¼{ªºª¬ªp¥L¤]³£n¥h³B²z
¥i¬O¥Îif else §Ú¥u¶·n¦Ò¼{¬Yª¬ªp¦¨¥ß¤Uªº³¡¥÷ ³Ñ¤Uªº´N¤£¥Î¥h¹Bºâ¤F
³o¼ËÀ³¸Ó¨S¿ù
(§Ú¹ê»Ún¦Ò¼{ªº±ø¥ó¦Ü¤Ö¦³10ºØ
¨ºÅܤƲզX¬ù¤@¦Ê¦hºØ)
©Ò¥H§Ú¤~·Q¥[§Ö¹Bºâ
¥Ø«e¥Î³o¤èªk¦³®É§Ö¥«·|delay
³Â·Ð§i¶D§Ú«ç¼Ë§@¸û¦n
ÁÂÁ±zªºÀ°¦£
ì½X:
OO:O;
CC:C;
for i=1 to datacount do begin
if OO[i]>CC[i] then begin
..........²Å¦X±ø¥ó¤§³B²z..........
end else begin
..........¤£²Å¦X±ø¥ó¤§³B²z..........
end;
end;
¥þ³¡®É¶¡§¡¬°¥xÆW®É¶¡, ²{¦b®É¶¡¬°07:28 | ¦b³oÓ¶±Åã¥Ü¥»¥DÃD¥þ³¡ªº 12 Ӥ峹 |
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
²·R¬v¦æ »s§@ Copyright 2003-. All Rights Reserved.