You are using the value looking into the future
use this
mybi = ValueWhen( dn == 1060630, bi, 1 );

-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com


On 18/01/07, whitneybroach <[EMAIL PROTECTED]> wrote:
> Graham,
>
> How about a more general case?  Try this in Explore with the To date
> as 6/30/2006 on Alcoa Aluminum (AA).
>
> I must be missing something (maybe my brain).
>
> Best,
> Whitney
>
> ///////////////////////////////////////////////////////////
> Buy=Sell=Short=Cover=0;
> Filter = 1;
> bi = BarIndex();
> dn = DateNum();
>
> mybi = ValueWhen( dn == 1060630, bi, 0 );
>
> AddColumn( dn, "dn", 1.0, colorDefault, colorDefault );
> AddColumn( mybi, "mybi", 1.0, colorDefault, colorDefault );
> ///////////////////////////////////////////////////////////
>
>
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
> Yahoo! Groups Links
>
>
>
>

Reply via email to