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

Re: [amibroker] Re: basic question about referencing bars



PureBytes Links

Trading Reference Links

Use IIF for arrays

bigitop wrote:
>
>
> thanks!! Ref() worked perfectly.
>
> can you please help me with one more thing
>
> i have a variable:
>
> variableX = variableY / abs(variableZ);
>
> i'm trying to use inside an if statement like this:
>
> if (variableX > .5)
>
> but it gives me the following error:
>
> "Condition in IF, WHILE, FOR statements has to be numeric or boolean
> type. You cannot use an array here, please use [] (array subscript
> operator) to access array elements"
>
> i tried referencing it as variableX[0] but it doesnt work. how do i
> know what's inside an array so that i can refer to it??
>
> --- In amibroker@xxxxxxxxxxxxxxx <mailto:amibroker%40yahoogroups.com>, 
> "sidhartha70" <sidhartha70@xxx> wrote:
> >
> > Use the Ref() function...
> >
> > --- In amibroker@xxxxxxxxxxxxxxx 
> <mailto:amibroker%40yahoogroups.com>, "bigitop" <doctormuniz@> wrote:
> > >
> > >
> > > hi, im learning AFL and need some basic help.
> > >
> > > while i'm running a script how can i reference previous bars and
> > > forward bars?
> > >
> > > in other words, how do i get OCHLV info from a bar(s) that are back in
> > > time and forward in time from the current array for the same symbol?
> > >
> > > I guess it would be something like: TimeFrameSet( currentBar - 1 )
> > >
> > > is this possible with AB?
> > >
> >
>
> 
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.176 / Virus Database: 270.11.3/1967 - Release Date: 2/23/2009 7:17 AM
>
>   



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/