[amibroker] Re: Passing a variable into the Ref() function

2007-11-10 Thread Mike
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

[amibroker] Re: Passing a variable into the Ref() function

2007-11-10 Thread Mike
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

[amibroker] Re: Passing a variable into the Ref() function

2007-11-10 Thread chorlton_c_hardy
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

Re: [amibroker] Re: Passing a variable into the Ref() function

2007-11-10 Thread Tomasz Janeczko
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

[amibroker] Re: Passing a variable into the Ref() function

2007-11-10 Thread chorlton_c_hardy
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

Re: [amibroker] Re: Passing a variable into the Ref() function

2007-11-10 Thread Tomasz Janeczko
: [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)

[amibroker] Re: Passing a variable into the Ref() function

2007-11-10 Thread dbwyatt_1999
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