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

Re: [amibroker] Re: referencing last buy price



PureBytes Links

Trading Reference Links


Nick,
 
The code I gave was correct if you use the following buy code: 
 
BuyCond= <your buy conditions>;//buy signal
Buy=ref(BuyCond,-1);//buy today when the buy condition was true 
yesterday
 
This is analogous to setting your buy delay to 1 in Settings. 
 
Al Venosa
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
n94612 
To: <A title=amibroker@xxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Wednesday, October 09, 2002 10:13 
PM
Subject: [amibroker] Re: referencing last 
buy price
Good point, Al, but as I was looking at this, it occurred 
to me that this:(B1=ValueWhen(Buy, Open);...would give the 
vzlue of the open on the day of the buy signal --  which would have 
already passed.May I repectfully suggest this small 
revision:B1 = ValueWhen(BarsSince(Buy) == 1, Open);/* The value of 
the open the morning after the buy signal  */Best 
Regards,Nick MolchanoffPost 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.