Utilities - UTIL


Parameters:

Description:

A collection of functions for use in creating custom indicators with the CUS indicator.


ACCUM
Accumulation method.

Normal
Used to normalize an array input.

COMP
Used for comparing two sets of data arrays by a relational operator. The result is a boolean (TRUE/FALSE) data array of values. The comparison is made by comparing the first array with the second array. If the comparison between the 2 data arrays is true, a TRUE value is returned. If false, FALSE is returned.

ADD
Used to add two data arrays.

DIV
Used to divide two data arrays.

MUL
Used to multiply two data arrays.

SUB
Used to subtract two data arrays.

COUNTER
Counts the number of TRUE signals that appear in the first array input. The count will continue until a TRUE signal is received in the reset array (array input 2). Once a reset is received, the counter value is plotted and the counter is reset back to zero and counting resumes.

REF
Used for returning a data array of bar values. An optional period parm can displace the data back a number of bars.

PER
Plots the performance of the array input from the first bar as the zero reference.

COLOR
An input array of values is used as a guide to test a value for a 'true' value and then apply a color to the color array.


Formula Reference:


For a description of some types used. See here.

ACCUM
UTIL(Method, ARRAY INPUT)
Function
ARRAY INPUT can be either an array of bars or a formula variable array of data.
Example
UTIL(ACCUM, Close)

Normal
UTIL(Method, ARRAY INPUT)
Function
ARRAY INPUT can be either an array of bars or a formula variable array of data.
Example
UTIL(Normal, Close)

ADD
UTIL(Method, ARRAY INPUT, DOUBLE)
UTIL(Method, ARRAY INPUT, ARRAY INPUT2)
Function
Adds the values of the ARRAY INPUT and ARRAY INPUT2/DOUBLE value. ARRAY INPUT and ARRAY INPUT2 can be either an array of bars or a formula variable array of data. The DOUBLE is a number.
Example
UTIL(ADD, Close, Open) or UTIL(ADD, Close, 45.5)

DIV
UTIL(Method, ARRAY INPUT, DOUBLE)
UTIL(Method, ARRAY INPUT, ARRAY INPUT2)
Function
Divides the ARRAY INPUT value by the ARRAY INPUT2/DOUBLE value. ARRAY INPUT and ARRAY INPUT2 can be either an array of bars or a formula variable array of data. The DOUBLE is a number.
Example
UTIL(DIV, Close, Open) or UTIL(DIV, Close, 45.5)

MUL
UTIL(Method, ARRAY INPUT, DOUBLE)
UTIL(Method, ARRAY INPUT, ARRAY INPUT2)
Function
Multiplies the ARRAY INPUT value by the ARRAY INPUT2/DOUBLE value. ARRAY INPUT and ARRAY INPUT2 can be either an array of bars or a formula variable array of data. The DOUBLE is a number.
Example
UTIL(MUL, Close, Open) or UTIL(MUL, Close, 45.5)

SUB
UTIL(Method, ARRAY INPUT, DOUBLE)
UTIL(Method, ARRAY INPUT, ARRAY INPUT2)
Function
Subtracts the ARRAY INPUT2 value from the ARRAY INPUT/DOUBLE value. ARRAY INPUT and ARRAY INPUT2 can be either an array of bars or a formula variable array of data. The DOUBLE is a number.
Example
UTIL(SUB, Close, Open) or UTIL(SUB, Close, 45.5)

COMP
UTIL(Method, ARRAY INPUT, DOUBLE, OPERATOR)
UTIL(Method, ARRAY INPUT, ARRAY INPUT2, OPERATOR)
Function
ARRAY INPUT and ARRAY INPUT2 can be either an array of bars or a formula variable array of data. The DOUBLE is a number. OPERATOR is a relational operator.
Example
UTIL(COMP, Close, Open, LTEQ) or UTIL(COMP, Close, 45.5, GTEQ)

COUNTER
UTIL(Method, ARRAY INPUT)
UTIL(Method, ARRAY INPUT, ARRAY INPUT2)
Function
ARRAY INPUT and ARRAY INPUT2 can be either an array of bars or a formula variable array of data.
Example
UTIL(COUNTER, Close) or UTIL(COUNTER, Close, reset_array)

REF
UTIL(Method, ARRAY INPUT, PERIOD)
UTIL(Method, DOUBLE)
Function
ARRAY INPUT can be either an array of bars or a formula variable array of data. PERIOD is the number of bars to offset backwards. DOUBLE is used to create a REF of one value.
Example
UTIL(REF, Close, 0) for no offset, UTIL(REF, Close, 10) to offset 10 bars backwards
UTIL(REF, 5.5) to create a plot of a single value.

PER
UTIL(Method, ARRAY INPUT)
Function
ARRAY INPUT can be either an array of bars or a formula variable array of data.
Example
UTIL(PER, Close)

COLOR
UTIL(Method, ARRAY INPUT, COLOR ARRAY, VALUE, COLOR)
Function
ARRAY INPUT is an array of values. COLOR ARRAY is the array the color will be applied to. VALUE is the number used to compare in the ARRAY INPUT. COLOR is the color to use.
Example
UTIL(COLOR, bool_array, bars, 1, red)



Back NextHome