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

Re: Back references and functions



PureBytes Links

Trading Reference Links

You can try something like this.  Create an indicator that computes the 14 
period RSI of 10 bars ago.  The two ways of doing this are to put the [10] 
inside the function or outside the function.  If they were the same the 
difference should be zero.  Plot the following code in an indicator and 
look at the results in the debug window.  You will see that early on, the 
difference is not zero but gets smaller over time.  If you use TS4.0, you 
cannot use the Cleardebug function.

if barnumber = 1 then cleardebug;
Print( d:6:0, RSI(C[10],14) -  RSI(C,14)[10]:5:5);



At 05:10 PM 4/14/01 -0700, you wrote:
>Could you please name a function that doesn't work using the
>first method.
>
>thanks,
>
>tbr
>
>William Brower wrote:
> >
> > Actually, both methods work, however you will find that some functions
> > return incorrect results when the [10] is placed inside the function.  To
> > insure correct results all the time, place the [10] outside the user 
> function.
> >
> > At 04:35 PM 4/13/01 -0700, you wrote:
> > >Hi,
> > >
> > >I believe either
> > >
> > >         Highest(H[10], 5)
> > >
> > >or
> > >
> > >         Highest(H, 5)[10]
> > >
> > >will work.  The first is better in that it doesn't create a
> > >series for the highest() function.
> > >
> > >regards,
> > >
> > >tbr
> > >
> > > >
> > > > What is the ELA code for the highest high for the 5 minute range 
> ending 10
> > > > minutes ago?  i.e.
> > > >
> > > > maxlist(h[5],h[6],h[7],h[8],h[9])
> > > >
> > > > or how about
> > > >
> > > > MaxList (h,5[10])   ???????
> > > >
> >
> > Bill Brower
> > Email: 1000mileman@xxxxxxxxxxxxxx
> > Web Site: insideedge.net

Bill Brower
Email: 1000mileman@xxxxxxxxxxxxxx
Web Site: insideedge.net