ups.com, "Tomasz Janeczko"
> > wrote:
> > >
> > > Ref accepts variable periods So all these workarounds are not
> > required.
> > >
> > > Ref( C, -x ) works perfectly fine.
> > >
> > > Best regards,
> > > T
perfectly fine.
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > - Original Message -
> > From: "dbwyatt_1999"
> > To:
> > Sent: Saturday, November 10, 2007 3:30 PM
> > Subject: [amibroker] Re: Pas
gt; amibroker.com
> - Original Message -
> From: "chorlton_c_hardy" <[EMAIL PROTECTED]>
> To:
> Sent: Saturday, November 10, 2007 11:31 PM
> Subject: [amibroker] Re: Passing a variable into the Ref() function
>
>
> >
> > Hello Tomasz,
> &g
groups.com, "Tomasz Janeczko" <[EMAIL PROTECTED]>
> wrote:
>>
>> Ref accepts variable periods So all these workarounds are not
> required.
>>
>> Ref( C, -x ) works perfectly fine.
>>
>> Best regards,
>> Tomasz Janeczko
rds,
> Tomasz Janeczko
> amibroker.com
> - Original Message -
> From: "dbwyatt_1999" <[EMAIL PROTECTED]>
> To:
> Sent: Saturday, November 10, 2007 3:30 PM
> Subject: [amibroker] Re: Passing a variable into the Ref() function
>
>
> > Variables
: [amibroker] Re: Passing a variable into the Ref() function
> Variables are arrays in AB, so Ref(Close,-x) probably would not
> work. If you have a predefined set of values for x, you could use
> iif statements:
>
> myValue = iif(x==5, Ref(C,-5), iif(x==10, Ref(C,-10)
Variables are arrays in AB, so Ref(Close,-x) probably would not
work. If you have a predefined set of values for x, you could use
iif statements:
myValue = iif(x==5, Ref(C,-5), iif(x==10, Ref(C,-10), iif(x==15, Ref
(C,-15),Null)));
However the best way to access variable array index offsets is