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

RE: [amibroker] stock price at time of buy signal



PureBytes Links

Trading Reference Links

Big difference.

LastValue is always the most recent piece of data in the database
regardless of the bar you think you are on.

ValueWhen is a historical reference to the "Value" of the array "When"
the condition was last True. This will never be the current bar.
--
Terry
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of cdepuy
Sent: Friday, June 23, 2006 09:46
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] stock price at time of buy signal

Can anyone tell me what is the difference between these two?  I'm
tracing and i'm getting different results for different stocks.  Thank
you!

PriceAtBuySignal = ValueWhen (Buy==1,Close);
_TRACE("PriceAtBuySignal "+PriceAtBuySignal);

PriceAtBuySignal = LastValue (BuyPrice);
_TRACE("PriceAtBuySignal "+PriceAtBuySignal);






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