I have created a dynamic array that looks at a running sequence of five values that meets a predetermined condition. When a value meets the condition, the new value comes in and the last value is removed from the array. I am able to use the "canned" array average function and successfully calculate the average of those five values. I now want to do a more sophisticated mathematical operation on those array values and there isn't a pre-written mathematical function available on the platform I am using. Do I have to create new function code for any sophisticated mathematical operation that I want to apply to the array values. Or, is there an easier way? Writing new code every time I want to creatively use math to evaluate the array values seems like an arduous task.
Is there some standard code that can be written and re-purposed if you do indeed need to rewrite every function before it can be applied to an array?
Functions applied to Arrays
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Functions applied to Arrays
Hello trader0311,
There are multiple prebuilt functions for array operations:
array_compare
array_contains
array_getmaxindex
array_copy
If you need additional functionality - you can create your own functions for it.
There are multiple prebuilt functions for array operations:
array_compare
array_contains
array_getmaxindex
array_copy
If you need additional functionality - you can create your own functions for it.