Series Functions

Top  Previous  Next

The following functions can be used with series variables.

 


 

 

Highest

 

Find the highest value of the series.

Lowest

 

Finds the lowest value of the series.

Average

 

Finds the average value of the series.

StandardDeviation

 

Finds the standard deviation of the series.

RegressionSlope


Finds the slope of the linear regression.

RegressionEnd


Finds the end point (Y axis) after a call to RegressionSlope

Correlation


Finds the correlation of two series.

CorrelationLog


Finds the correlation of two series, using the log of the change in price.

CorrelationSynch


Used for IPV Auto Indexed Series or Price Series and synchs the dates of the two series before computing the correlation

CorrelationLogSynch


Used for IPV Auto Indexed Series or Price Series and synchs the dates of the two series before computing the correlationlog

CrossOver


Returns true if two series have crossed over.

HighestBar


Returns the number of bars back from the starting offset of the highest bar.

LowestBar


Returns the number of bars back from the starting offset of the lowest bar.

Median


Returns the median.

StandardDeviationLog


Returns the standard deviation of the log of the change in prices.

SwingHigh


Returns the swing high value.

SwingHighBar


Returns the number of bars back from the starting offset of the swing high bar.

SwingLow


Returns the swing low value.

SwingLowBar


Returns the number of bars back from the staring offset of the swing low bar.

SortSeries


Sorts the series

SortSeriesDual


Sorts series1 based on the values of series2

GetSeriesSize


Returns the current size of the series.

SetSeriesSize


Sets the size of the series.

SetSeriesValues


Sets a value into every element of the series




 

The series on which these function apply:

 

instrument.open
instrument.high
instrument.low
instrument.close
instrument.volume
instrument.openInterest
instrument.unadjustedClose
instrument.extraData1 through instrument.extraData8
instrument.weekOpen (indexed by week)
instrument.weekHigh (indexed by week)
instrument.weekLow (indexed by week)
instrument.weekClose (indexed by week)
Block Permanent Series Variables
Instrument Permanent Series Variable
Indicators

 

 

NOTE: if you use this function on an "Auto Indexed" Instrument Permanent or Block Permanent Series variable, then the offset parameter sets the start index as a lookback from the current instrument bar or test day. However, if you use this function on a non "Auto Indexed" series variable, then the offset parameter is the start index.  The function uses the bars prior to and including the start index for the calculation.

 

Example

' myCustomArray is defined as an Instrument Permanent non Auto Indexed Series Variable

 

' Finds the average of elements number 8, 9, and 10:

myAverage = Average( myCustomArray, 3, 10 )