Thanks for the response!  This seems like it would work but when I 
try and plot this function it doesn't show anything, but at least I'm 
not getting an error message.  Does anybody have any idea why?

Jeff H.





--- In [email protected], "bilbo0211" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], "jeffro861" <jeffro861@> wrote:
> >
> > How to I get RSI() to take an array as an arguement?  Let's say I 
have 
> > a function that I want to use for determining the number of bars 
RSI() 
> > uses (it which changes for every bar).  How do set this up?  
> 
> I don't remember where I found this code but I think it does what 
you
> want.
> 
> 
> //period is an array
> 
> function varPeriodRSI( priceField, period )
> {
>   Chg = priceField - Ref( priceField, -1 );
>   pc = Max( Chg, 0 );
>   nc = Max( -Chg, 0 );
> 
>   pa = AMA( pc, 1/period );
>   na = AMA( nc, 1/period );
> 
>   return 100 * pa / ( pa + na );
> }
>


Reply via email to