Data Series
Last updated
Last updated
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 is a of the type , in which the historical opening prices are saved.
BarsAgo Index Value (see )
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].
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].
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].
barsAgo Index value for the individual bars within the data series barSeriesIndex Index value for the various timeframes
Indicators are usually calculated using the closing prices.
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].
barsAgo Index value of the individual bars within the data series barSeriesIndex Index value for the various timeframes
The median price of a bar is calculated using (high + low) / 2
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].
barsAgo Index value for the individual bars within a data series barSeriesIndex Index value for the various timeframes
The typical price of a bar is calculated using (high + low + close) / 3.
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].
barsAgo Index value of the individual bars within a data series barSeriesIndex Index value of the various timeframes
The weighted price of a bar is calculated using the formula (high + low + 2*close) / 4 and then weighted on the closing price.
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].
barsAgo Index value of the individual bars within a data series barSeriesIndex Index value for the various timeframes
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].
barsAgo Index value for the individual bars within a data series barSeriesIndex Index value for the various timeframes
Volume
Volume[int barsAgo]
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].
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].
barsAgo Index value of the individual bars within a data series
barSeriesIndex Index value of the various timeframes
TimeFrame is a timeframe object. This property is used to read the current TimeFrame and not to set it.
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"
barSeriesIndex Index value for the various timeframes
The returned value is dependent upon the property of .
In addition, please see for more information.
barsAgo Index value for the individual bars within the data series (see ) barSeriesIndex Index value for the various timeframes
The returned value is dependent upon the property of .
See example: .
High is a of the type , in which the historical high prices are saved.
barsAgo IndexValue (see )
The returned value is dependent upon the property of .
See .
barsAgo Index value for the individual bars within the data series (see ) barSeriesIndex Index value for the various timeframes
The returned value is dependent upon the property of .
Please see examples under .
Low is a of the type , in which the historical low prices are saved.
barsAgo IndexValue (see )
The returned value is dependent upon the property of .
Lows is an array of [DataSeries][1] that contains all data series.
See .
The returned value is dependent upon the property .
See example .
Close is a of the type , in which the historical closing prices are saved.
barsAgo Index value (see )
The returned value is dependent upon the property .
Closes is an array of [DataSeries][1] that contains all data series.
See .
The returned value is dependent upon the property .
See example .
Median is a of the type , in which the historical median values are saved.
See & .
barsAgo Index value (see )
The returned value is dependent upon the property .
Further information about median, typical und weighted:
Medians is an array of [DataSeries][1] that contains all data series.
See .
The returned value is dependent upon the property .
Further information on median:
See example in .
Typical is a of the type , in which the historical typical values are saved.
See and .
barsAgo Index value (see )
The returned value is dependent upon the property .
Further information on typical:
Typicals is an array of DataSeries that contains all data series.
See .
The returned value is dependent upon the property .
See example .
Weighted is a of the type , in which the historical weighted values are saved.
See also and .
barsAgo Index value (see )
The returned value is dependent upon the property .
Information regarding weighted:
Weighteds is an array of [DataSeries][1] that contains all data series.
See .
The returned value is dependent upon the property .
See example under .
Time is a of the type , in which the timestamps of the individual bars are saved.
barsAgo Index value (see )
The returned value is dependent upon the property .
Times is an array of that contains all data series.
See .
The returned value is dependent upon the property .
See example .
Volume is a of the type , in which the historical volume information is saved.
barsAgo Index value (see )
The returned value is dependent upon the property .
Volumes is an array of that contains all data series.
See .
The returned value is dependent upon the property
See example .
TimeFrames [0] is equivalent to .
See .