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

Re: Previous Values of an ARRAY passed to a function



PureBytes Links

Trading Reference Links

So I read your email and study your code and then you say
is that even possible in TS2k. Are you writing in TS2k or
TS4 or TSPro?

With code questions is might be helpful if people prefaced
their email with what system they are using or put it in
the subject line. 


--- Mike <pooltreatments@xxxxxxxxxxxx> wrote:
> The Manual says that if i pass an array to a function and
> declare it as 
> "NumericArray" then I sould be able to refer to previous
> values of it.
> 
> I created a funtion called MaxValArray and in properties
> declared it as 
> series (allthough I think this has nothing to do with the
> parameters 
> inside the function)
> 
> Input: MyArray[M](NumericArray);
> If MyArray[1][5] > High Then MaxValArray = 1;
> MaxValArray = 0;
> 
> 
> My Indicator is very simple. It calls this Function and
> sends it the 
> array as an argumentlike this:
> 
> Array: MyArray[10](0) ;
> Value1 = MaxValArray(MyArray) ;
> 
> When I try to compile it I just get an error message from
> the Power 
> Editor that says:
> "Cannot Reference a Previous Value of a simple input"
> 
> If I could get this to work I would be happy. I would be
> really happy if 
> I could refer to previous values of an array that i pass
> by REF ie 
> declared as:
> 
> Input: MyArray[M](NumericArrayRef);
> 
> Is that even possible in TS2k
> 
> Regards
> Mike
>