DevSqrdArray (Function)
The DevSqrdArray function calculates the sum of squares of deviations of values in an array from the average.
Syntax
DevSqrdArray(PriceArray,Size)
Returns (Double)
A numeric value containing the sum of squares of deviations from an average for an array of values.
Parameters
Name | Type | Description |
PriceArray | Numeric | Specifies the name of a numeric array containing values upon which the sum of squares of deviations is calculated. |
Size | Numeric | Sets the number of data elements (size) in the array to evaluate. |
Remarks
The DevSqrdArray calculation is similar to the classic statistical volatility (Statistical Standard Deviation), the difference being that peaks (higher values) are accentuated because the values are squared.
The value for the Size input parameter should always be a whole number greater than 0 and is typically equal to the number of data elements in the array.
The DevSqrdArray function only works with one-dimensional arrays. All array-based referencing begins with array element 1.
Example
Assigns to Value1 the Skew factor of the specified named array MyArray with 40 elements.
Array: MyArray[40](0);
{… add EL statements here to assign price values to array elements... }
Value1 = DevSqrdArray(MyArray,40);