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

Previous Values of an ARRAY passed to a function



PureBytes Links

Trading Reference Links

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