Data Series
Data series are interpreted as freely usable data storage containers for your programs. Additionally, they an integrated component of AgenaTrader that saves the price changes for individual bars. We will be focusing on the latter function here. In the following section, the concept of data series will be explained in detail and understandably. All price data for the individual bars are organized and saved within data series. The following are available:
Open
Description
Open is a DataSeries of the type DataSeries, in which the historical opening prices are saved.
Parameter
BarsAgo Index Value (see Bars)
Usage
More Information
The returned value is dependent upon the property of CalculateOnClosedBar.
Example
Opens
Description
Opens is an array of data series that contains all open data series.
This array is only useful or meaningful for indicators or strategies that use multiple data from multiple timeframes. A new entry is entered into the array whenever a new timeframe is added to an indicator or strategy.
With [TimeFrameRequirements(("1 Day"), ("1 Week"))] the array will contain 3 entries:
Opens[0] The open data series of the chart timeframe Opens[1] The open data series of all bars in a daily timeframe Opens[2] The open data series of all bars in a weekly timeframe
Opens[0][0] is equivalent to Open[0].
In addition, please see MultiBars for more information.
Parameter
barsAgo Index value for the individual bars within the data series (see Bars) barSeriesIndex Index value for the various timeframes
Usage
More Information
The returned value is dependent upon the property of CalculateOnClosedBar.
Example
See example: Multibars.
High
Description
High is a Data Series of the type Data Series, in which the historical high prices are saved.
Parameter
barsAgo IndexValue (see Bars)
Usage
More Information
The returned value is dependent upon the property of CalculateOnClosedBar.
Example
Highs
Description
Highs is an array of [DataSeries][1] that contains all high data series.
This array is only of value for indicators or strategies that use data from multiple timeframes.
A new entry is added to the array whenever a new time unit is added to an indicator or strategy.
With [TimeFrameRequirements(("1 Day"), ("1 Week"))] the array will contain 3 entries:
Highs[0] the high data series of the chart timeframe Highs[1] the high data series of all bars in a daily timeframe Highs[2] the high data series of all bars in a weekly timeframe
Highs[0][0] is equivalent to High[0].
See MultiBars.
Parameter
barsAgo Index value for the individual bars within the data series (see Bars) barSeriesIndex Index value for the various timeframes
Usage
More Information
The returned value is dependent upon the property of CalculateOnClosedBar.
Example
Please see examples under Multibars.
Low
Description
Low is a DataSeries of the type DataSeries, in which the historical low prices are saved.
Parameter
barsAgo IndexValue (see Bars)
Usage
More Information
The returned value is dependent upon the property of CalculateOnClosedBar.
Example
Lows
Description
Lows is an array of [DataSeries][1] that contains all Low data series.
This array is only of value to indicators or strategies that use data from multiple time units.
A new entry is added whenever a new time unit is added to an indicator or strategy.
With [TimeFrameRequirements(("1 Day"), ("1 Week"))] the array will contain 3 entries:
Lows[0] the low data series for the chart timeframe Lows[1] the low data series for all bars in a daily timeframe Lows[2] the low data series for all bars in a weekly timeframe
Lows[0][0] is equivalent to Low[0].
See MultiBars.
Parameter
barsAgo Index value for the individual bars within the data series barSeriesIndex Index value for the various timeframes
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Example
See example Multibars.
Close
Description
Close is a DataSeries of the type DataSeries, in which the historical closing prices are saved.
Parameter
barsAgo Index value (see Bars)
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Indicators are usually calculated using the closing prices.
Example
Closes
Description
Closes is an array of [DataSeries][1] that contains all Low data series.
This array is only of importance to indicators or strategies that use data from multiple time units.
A new entry is added to the array whenever a timeframe is added to an indicator or strategy.
With [TimeFrameRequirements(("1 Day"), ("1 Week"))] the array will contain 3 entries:
Closes[0] the close data series of the chart timeframe Closes[1] the close data series of all bars in a daily timeframe Closes[2] the close data series of all bars in a weekly timeframe
Closes[0][0] is equivalent to Close[0].
See MultiBars.
Parameter
barsAgo Index value of the individual bars within the data series barSeriesIndex Index value for the various timeframes
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Example
See example Multibars.
Median
Description
Median is a DataSeries of the type DataSeries, in which the historical median values are saved.
The median price of a bar is calculated using (high + low) / 2
Parameter
barsAgo Index value (see Bars)
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Further information about median, typical und weighted: http://blog.nobletrading.com/2009/12/median-price-typical-price-weighted.html
Example
Medians
Description
Medians is an array of [DataSeries][1] that contains all Median data series.
This array is only of value to indicators or strategies that use data from multiple timeframes.
A new entry is added to the array whenever a new time frame is added to an indicator or strategy.
With [TimeFrameRequirements(("1 Day"), ("1 Week"))] the array will contain 3 entries:
Medians[0] the median data series of the chart timeframe Medians[1] the median data series of all bars in a daily timeframe Medians[2] the median data series of all bars in a weekly timeframe
Medians[0][0] is equivalent to Medians[0].
See MultiBars.
Parameter
barsAgo Index value for the individual bars within a data series barSeriesIndex Index value for the various timeframes
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Further information on median: http://www.investopedia.com/terms/m/median.asp
Example
See example in Multibars.
Typical
Description
Typical is a DataSeries of the type DataSeries, in which the historical typical values are saved.
The typical price of a bar is calculated using (high + low + close) / 3.
Parameter
barsAgo Index value (see Bars)
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Further information on typical: https://technicianapp.com/resources/typical-price/
Example
Typicals
Description
Typicals is an array of DataSeries that contains all Typical data series.
This array is only of value to indicators and strategies that make use of multiple timeframes.
A new entry is added to the array whenever a new timeframe is added to an indicator or strategy.
With [TimeFrameRequirements(("1 Day"), ("1 Week"))] the array will contain 3 entries:
Typicals[0] the typical data series of the chart timeframe Typicals[1] the typical data series of all bars in a daily timeframe Typicals[2] the typical data series of all bars in a weekly timeframe
Typicals[0][0] is equivalent to Typicals[0].
See MultiBars.
Parameter
barsAgo Index value of the individual bars within a data series barSeriesIndex Index value of the various timeframes
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Example
See example Multibars.
Weighted
Description
Weighted is a DataSeries of the type DataSeries, in which the historical weighted values are saved.
The weighted price of a bar is calculated using the formula (high + low + 2*close) / 4 and then weighted on the closing price.
Parameter
barsAgo Index value (see Bars)
Usage
Weighted
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Information regarding weighted: http://www.stock-trading-infocentre.com/pivot-points.html
Example
Weighteds
Description
Weighteds is an array of [DataSeries][1] that contains all Weighted data series.
The array is only of value for indicators and strategies that use data from multiple timeframes.
A new entry is added to the array whenever a new timeframe is added to an indicator or strategy.
With [TimeFrameRequirements(("1 Day"), ("1 Week"))] the array will contain 3 entries:
Weighteds[0] the weighted data series of the chart timeframe Weighteds[1] the weighted data series of all bars in a daily timeframe Weighteds[2] the weighted data series of all bars in a weekly timeframe
Weighteds[0][0] is equivalent to Weighteds[0].
See MultiBars.
Parameter
barsAgo Index value of the individual bars within a data series barSeriesIndex Index value for the various timeframes
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Example
See example under Multibars.
Time
Description
Time is a DataSeries of the type DateTimeSeries, in which the timestamps of the individual bars are saved.
Parameter
barsAgo Index value (see Bars)
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Example
Times
Description
Times is an array of DataSeries that contains all Time data series.
This array is only of value to indicators and strategies that make use of multiple timeframes. A new entry is added to the array whenever a new timeframe is added to an indicator or strategy.
With [TimeFrameRequirements(("1 Day"), ("1 Week"))] the array will contain 3 entries:
Times[0] the time data series of the chart timeframe Times[1] the time data series of all bars in a daily timeframe Times[2] the time data series of all bars in a weekly timeframe
Times[0][0] is equivalent to Times[0].
See MultiBars.
Parameter
barsAgo Index value for the individual bars within a data series barSeriesIndex Index value for the various timeframes
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Example
See example Multibars.
Volume
Description
Volume is a DataSeries of the type DataSeries, in which the historical volume information is saved.
Parameter
barsAgo Index value (see Bars)
Usage
Volume
Volume[int barsAgo]
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
The value returned by the VOL() indicator is identical with the volume described here; for example, Vol()[3] will have the same value as Volume[3].
Example
Volumes
Description
Volumes is an array of DataSeries that contains all Volume data series.
This array is only of value for indicators or strategies that use data from multiple timeframes.
A new entry is added to the array whenever a new timeframe is added to an indicator or strategy.
With [TimeFrameRequirements(("1 Day"), ("1 Week"))] the array will contain 3 entries:
Volumes[0] the volume data series of the chart timeframe Volumes[1] the volume data series of all bars in the daily timeframe Volumes[2] the volume data series of all bars in the weekly timeframe
Volumes[0][0] is equivalent to Volumes[0].
See MultiBars.
Parameter
barsAgo Index value of the individual bars within a data series
barSeriesIndex Index value of the various timeframes
Usage
More Information
The returned value is dependent upon the property CalculateOnClosedBar.
Example
See example Multibars.
TimeFrame
Description
TimeFrame is a timeframe object. This property is used to read the current TimeFrame and not to set it.
Usage
TimeFrames
Description
TimeFrames is an array of timeframe objects that contains a timeframe object for each individual bar object.
This array is only of value for indicators or strategies that use data from multiple timeframes.
A new entry is added to the array whenever a new timeframe is added to an indicator or strategy.
With [TimeFrameRequirements(("1 Day"), ("1 Week"))] the array will contain 3 entries:
TimeFrames [0] Timeframe of the primary data series (chart timeframe) TimeFrames [1] Print(TimeFrames[1]); // returns "1 Day" TimeFrames [2] Print(TimeFrames[2]); // returns "1 Week"
TimeFrames [0] is equivalent to TimeFrame.
See MultiBars.
Parameter
barSeriesIndex Index value for the various timeframes
Usage
Example
Last updated