--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm
On 07/07/06, Thomas Z. <[EMAIL PROTECTED]> wrote:
Hi Andre,i think the easiest way would simply be to use the exrem function. It would assure that you only get a new buy after a sell.
SYNTAX exrem( ARRAY1, ARRAY2 ) RETURNS ARRAY FUNCTION removes excessive signals:
returns 1 on the first occurence of "true" signal in Array1
then returns 0 until Array2 is true even if there are "true" signals in Array1EXAMPLE buy = ExRem( buy, sell );
sell = ExRem( sell, buy );Best regardsThomas
From: [email protected] [mailto:[email protected]] On Behalf Of Andre
Sent: Friday, July 07, 2006 9:14 AM
To: [email protected]
Subject: [amibroker] How do I keep the buyprice while multiple buy signals happenHello,
This should be the simplest thing and I am simply running in circles
with AFL not being able to give me what I want.
Here's what I want in simple terms:
• Buy on MACD crossing (buy at Open the following day).
• Sell at 3% profit or at 10% loss.
Period. That's all.
The problem I am having is in "keeping" the purchase price at hand.
Yes, I know about "ValueWhen" function, but I can't get it to work
because I can easily have multiple buy signals before the sell
occurs and a new Buy gives me a new BuyPrice that throws off all my
profit and loss targets.
Please advise. Thanks,
Andre Perman
__._,_.___
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
SPONSORED LINKS
| Investment management software | Real estate investment software | Investment property software |
| Software support | Real estate investment analysis software | Investment software |
YAHOO! GROUPS LINKS
- Visit your group "amibroker" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
