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@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cdepuy
Sent: Friday, June 23, 2006 09:46
To: amibroker@yahoogroups.com
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



 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to