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

Re: [amibroker] help with ref()



PureBytes Links

Trading Reference Links

Thanks Ara for the fast reply
i did that also and i still get zero
the issue is that i need to get the first date in the chart and then get 
the close for the same day for the Foreign stock

SetBarsRequired(100000, 0);
case30=Foreign ("case30","close ");
Case30basevalue= Ref (Foreign ("case30","close "), -BarCount);
Title = "  BarCount = " + BarCount + "Case30basevalue =" +Case30basevalue  ;



Ara Kaloustian wrote:
>
> Barcount is the last available data loaded, so when you ask for data 
> prior
> to Barcount bars, there is no data.
>
> If you want to load entire data set use
>
> SetBarsRequired(1000000,0); at top of program and use a different way of
> asking for data other than Barcount bars ago
>
> This may slow down program.
>
> ----- Original Message -----
> From: "Waleed Khalil" <waleedkhalil@xxxxxxxxx 
> <mailto:waleedkhalil%40gawab.com>>
> To: <amibroker@xxxxxxxxxxxxxxx <mailto:amibroker%40yahoogroups.com>>
> Sent: Friday, April 06, 2007 2:27 PM
> Subject: [amibroker] help with ref()
>
> > Hi all
> > Please tell me why the Ref function does not get data more that 260 days
> > ago,
> > it returns zero for any period more than 260 days ago
> >
> > _SECTION_BEGIN("stockovercase");
> > case30=Foreign ("case30","close ");
> > Case30basevalue= Ref (Foreign ("case30","close "), -BarCount);
> > Title = " BarCount = " + BarCount + "Case30basevalue =" 
> +Case30basevalue
> > ;
> > _SECTION_END();
> >
> >
> >
> > 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/ <http://www.amibroker.com/devlog/>
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html 
> <http://www.amibroker.com/support.html>
> >
> > Yahoo! Groups Links
> >
> >
> >
>
>  



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

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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