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

Re: [amibroker] Re: AFL : from date to barindex



PureBytes Links

Trading Reference Links

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 <WhitneyBroach@xxxxxxxxx> 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
>
>
>
>

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.13/632 - Release Date: 1/16/2007 4:36 PM