| 
 PureBytes Links 
Trading Reference Links 
 | 
Use the Flip() function to keep cond1 enabled.
-----Original Message-----
From: tchan95014 <tchan95014@xxxxxxxxx> [mailto:tchan95014@xxxxxxxxx]
Sent: Wednesday, February 19, 2003 6:16 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Need coding help
Hello,
	I am trying to code the following conditions into AFL, but
have difficulties doing it,
	please advise. Thanks.
	cond1 = xxx;	// a condition can come and go.
	cond2 = yyy;
	buy = cond1 AND cond2;
	What I want is when cond1 triggers, I want to disregard its
status and track only cond2.
	For example,
	SetTradeDelays(0, 0, 0, 0);
	cond1 = ref(cmo() > 80, -1);
	cond2 = h > ref(h, -1);
	buy = cond1 and cond2;
	when cond1 is triggered, I want to buy this stock only when
cond2 becomes true, which might take
	a couple of days (Of course they can come at the same day).
During these confirming days the cmo()
	might come down to less than 80, but I do not care, as long
as cond1 has been triggered I want cond2
	to take over and disregard cond1 all together.
	Thanks for any ideas.
	Thomas
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
 
 |