[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Triggering a Chandelier trailing stop with % favorable price excursion



PureBytes Links

Trading Reference Links

Your code should work in retrieving the Open price on the day you buy.
You probably should get the BuyPrice in case trade delays are set. 

However, you will need to use loops to affect the results because when
using array processing you cannot affect the array with code below the
original line. 

That's probably a confusing statement. I would need more of your code to
make any recommendations.
--
Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of cohndw
Sent: Sunday, July 23, 2006 21:50
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Triggering a Chandelier trailing stop with %
favorable price excursion

I am trying to calculate the % favorable price excursion based on the
current price vs the buy price, and then turn on a Chandelier trailing
stop if a % favorable price excursion threshhold is hit to lock in
more profits.  I am unable to grab the buyprice on the first buy
(opening price).  The code I am using is shown below.

OpenPrice = BeginValue(ValueWhen(Buy>0,Open,1));

Thanks,

Dave






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

 
Yahoo! Groups Links