| PureBytes Links Trading Reference Links | | try this:   Settings: all stocks n last quotations n=5 explore 
Buy=Cross(Close,MA(Close,50)); Sell=0; Filter=Buy > 0; AddColumn (ValueWhen (Buy ,Close ),"buy_close" );//gives close on "buy" 
date AddColumn (LastValue(Close) ,"close" );//last close 
  ----- Original Message -----  Sent: Saturday, November 05, 2005 11:50 
  AM Subject: [amibroker] Re: Unbelievably 
  Simple Question Thanks to Anthony Faragasso, Barry Scarborough & Graham 
  for their
 replys to my question.  Unfortunately, I didn't state my 
  question
 properly or I'm still missing something.
 
 I want to run the 
  Explore for say, the last 5 days with Filter=Buy
 (I'm just interested in 
  stocks meeting the buy criteria, thus no
 filter=1 which picks up 
  everything)
 and then see the close price today for stocks that might have 
  been
 selected 5 days ago.
 
 As an example, if I use Anthony's 
  code below (with filter=buy) the
 first selection it picks up is A 
  (Agilent) which triggered a buy on
 10-31-05  Both of the close 
  columns below give a close of 32.01
 which was correct for 10-31-05 but I'm 
  really looking for the close
 on 11-4-05 (which was 32.8).  So, how do 
  I use the filter=buy
 statement and get the latest EOD close??? I'm using 
  AB 4.7 with QP2
 EOD data, if it makes any difference.
 
 Thanks again 
  for any help-sorry to be bugging everyone for what is
 probably a super 
  trivial question/solution.
 
 chuck
 
 
 --- In 
  amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx>
 wrote:
 >
 > Buy=Cross(Close,MA(Close,50));
 >
 > 
  Sell=0;
 >
 > Filter=1;
 >
 > 
  AddColumn(ValueWhen(Buy,Close),"close");//gives close on "buy" date
 >
 > AddColumn(Close,"close");//close
 >
 >   ----- 
  Original Message -----
 >   From: chuckitall59
 >   To: amibroker@xxxxxxxxxxxxxxx
 >   Sent: 
  Friday, November 04, 2005 10:13 PM
 >   Subject: [amibroker] 
  Unbelievably Simple Question
 >
 >
 >   I'm not a 
  programmer nor new to AB but this incredibly simple,
 >   
  fundamental problem has me stumped.  I'm just trying to get
 todays
 >   close in Explore but I continually get the close on the 
  day the
 Buy
 >   took place when running Explore for 
  several days back
 (typically, n
 >   last days=5 or so). 
  I've checked Help and tried everything I can
 >   think of but 
  it still gives me the close on the buy date.  How
 do I
 >   get the following Explore code to give me TODAYS 
  close????
 >
 >
 >
 >   
  Buy=Cross(Close,MA(Close,50));
 >
 >   Sell=0;
 >
 >   Filter=Buy;
 >
 >   
  AddColumn(Close,"close");//gives close on "buy" date
 >
 >   AddColumn(Ref(Close,0),"close");//still doesn't 
  work
 >
 >
 >   Go easy on me gang-even I can't 
  believe I can't figure
 >   this out.
 >
 >   Thanks in advance,
 >   Chuck
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >   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
 >
 >     a..  Visit 
  your group "amibroker" on the web.
 >
 >     b..  To unsubscribe from this group, 
  send an email to:
 >      
  amibroker-unsubscribe@xxxxxxxxxxxxxxx
 >
 >     c..  Your use of Yahoo! Groups is 
  subject to the Yahoo! Terms
 of Service.
 >
 >
 > 
  -------------------------------------------------------------------
 -----------
 >
 
 
 
 
 
 
 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
   
 
   YAHOO! GROUPS LINKS
 
 
 
   
 | 
 |