You can use secondary price bars in your Quagensia® T Edition Strategies to enable your strategies to run on a main set of price bars but access data from a second, third, fourth, or higher order set of “secondary price bars”.
For example, you can create a strategy that uses the daily price bars for a single stock as its primary price bars, but your strategy can also consider the high or low prices of a “secondary” set of price bars, such as the daily price bars of gold futures or the monthly price bars of the same stock on whose daily data your strategy is using as its primary price bars.
You don’t really “create” a secondary price bar time series from within Quagensia T Edition. Instead, you create a secondary price bar time series manually from within the TradeStation® platform’s user interface by manually adding one or more additional time series to the TradeStation® chart to which the TradeStation® strategy is attached, and then use its data by referring to it from within Quagensia T Edition in one of two ways.
The first way you can refer to the secondary price bar time series that you manually added to the TradeStation® chart is by creating an internal variable of type “Read-Only Time Series”, setting its “Value” to one of the price bar time series in the “Replace/Set Item >> Price Data” context menu folder, clicking on your selected price bar time series’ gear icon, choosing the “Set Data Series Index” context menu item, and changing the value in the “of Data Series” text box to a whole number greater than 1. Additionally, if you want to count bars back for this price bar time series by counting backward over its bars instead of counting backward over the bars of the primary price bars time series, then click the “Set Multi-Data Series (i.e. Multiple Instruments or Time Frames) Time Series Properties” link button below your selected price bar time series, and change the value of the “Count Bars Back for this Time Series by Counting Backward Over the Bars of the Data Series with this Data Series Index (Primary=0, First Secondary=1)” field to match the number in the “of Data Series” text box.
The second way that you can refer to the secondary price bar time series that you manually added to the TradeStation® chart is by clicking on the gear icon of any primary price bars time series used anywhere in your Quagensia Algo, including those in the “Internal Variables” and “When Bar Updates” sections, choosing the “Set Data Series Index” context menu item, and changing the value in the “of Data Series” text box to a whole number greater than 1.
Note that the two procedures just described to convert a primary price bars time series to a secondary one are the same procedures for converting an indicator, such as the simple moving average, from one that uses the primary price bars time series as its time series input into an indicator that uses a secondary price bars time series as its time series input.
Note the value entered in the “Data Series Index” field must be less than or equal to the total number of time series on the chart. Failure to do this will cause an error to occur.
To learn more about using this feature in Quagensia T Edition, click on the “Set Multi-Data Series (i.e. Multiple Instruments or Time Frames) Time Series Properties” link, which will be visible beneath the grid row of any input parameter or internal variable definition whose variable’s data type is either “Read-Only Time Series” or “Editable Time Series”, then place your mouse pointer over the label that appears that is titled “Count Bars Back for this Time Series by Counting Backward Over the Bars of the Data Series with this Data Series Index (Primary=0, First Secondary=1)”, and a tooltip will appear.
To learn more about how to use Quagensia T Edition to configure plots for time series from within strategies that are applied to charts that display multiple data series (i.e. one or more secondary price bars), click on the “Set Multi-Data Series (i.e. Multiple Instruments or Time Frames) Plot Properties” link that is visible whenever the “Plot” check box for any internal variable definition is checked, then roll your mouse over the labels next to the fields that appear, and tooltips will appear.