Adding TradeStation® indicators to charts manually from within TradeStation® rather than plotting them automatically from your Quagensia® T Edition Strategy is usually the best approach to get great looking indicators on your TradeStation® charts.
To learn more about this topic, click the link below to watch the part of the “Create TradeStation® Strategies Using Point-&-Click with Quagensia T Edition – Full Tutorial” video that covers this topic in more depth. In the current version of this video, this discussion starts at the 49:38 mark and lasts 6 minutes 20 seconds, ending at the 55:58 mark. Note that the video will not stop automatically at the 55:58 mark.
Video Transcript: Add TradeStation® indicators to charts manually from within TradeStation® for best results.
Before we look at the backtest results of our strategy, notice that the indicator plots we configured in Quagensia’s “Internal Variables” section are only plotted on the last 100 bars. This is because the “QS_ShowPlots_NumberOfBarsBack” input parameter of our strategy was set to 100, which is its default value. Our strategy also has a “QS_ShowPlots” input parameter, which allows you to turn off the custom plots for these two indicators entirely. Enter the word “false” to turn off these custom plots or “true” to turn them back on. Our strategy also has a “QS_ShowCustomDrawnObjects” input parameter, which allows you to turn off all other custom drawn objects on the chart, such as the solid diamonds that we are drawing from our strategy.
We will discuss the reason for these three additional input parameters in a minute, but first let’s manually add the same moving average indicators with the same input parameters as those in our Quagensia Strategy to the chart from within the TradeStation® user interface. To do this, click the “Studies” menu and select “Add Study…” and add the indicators from the window that appears. We used a 3-bar weighted moving average and a 6-bar triangular moving average in our Quagensia Strategy, so we can select the “Mov Avg Triangular” indicator, then select the “Mov Avg Weighted” indicator while holding the control key down to allow us to select two indicators at once, then click “OK”. The indicators are then plotted on the charts, but with the wrong input parameters. To fix this, double click on each of the indicators, one at a time, and enter the correct input parameters in the window that opens for each indicator. Notice how the plots configured from within Quagensia appear to have the same values as the indicators we manually added from within TradeStation®’s user interface for the last 100 bars which is what we would expect.
Getting back to the discussion of the last three input parameters of our strategy, the reason Quagensia T Edition added these last three input parameters to our strategy is because plotting a time series or thousands of other custom drawing objects from within a TradeStation® EasyLanguage® strategy is a highly resource-intensive operation and can greatly slow down a chart to which your strategy is applied and can even cause TradeStation® to freeze. Due to this issue, the plots you configure in Quagensia T Edition will only be drawn on the last 100 bars of the chart by default. If you want to draw the plots on the bars that are further back in history, you can increase the value of the “QS_ShowPlots_NumberOfBarsBack” input parameter.
Note that the further back in history you choose to draw your plots, the more your charts will slow down and the greater the danger that TradeStation® will freeze.
Despite the performance impact that plotting time series has on TradeStation® charts, it is still valuable for a few reasons. First, plotting your time series on the last few hundred bars is a great help while you are creating a strategy since it helps you visualize the time series on which your strategy’s logic depends so you can ensure that your times series’ values appear to be correct. Second, these plots are particularly useful when you trade your strategy in live markets since when you are trading live you are likely to only be interested in the last few hundred bars anyway. Third, even if you need to plot your time series on thousands of bars at once because you are backtesting on a large amount of data and need to check the values of your time series thousands of bars ago, you should still be able to do this on a reasonably powerful computer, but the chart will slow down greatly. Once you are done visually checking your time series’ values on thousands of bars of data, you can then make your charts fast again by either changing the “QS_ShowPlots_NumberOfBarsBack” input parameter to a small number again or you can turn off all plotting by changing the value of the “QS_ShowPlots” input parameter to “false”.
If the time series you are plotting from your strategy is based on a Quagensia T Edition Function that has a corresponding TradeStation® indicator in TradeStation®’s “Add Study” window as in this example strategy, it is recommended that once you have visually inspected the custom plot of your time series to ensure that your times series’ values appear to be correct, you should add the TradeStation® indicator manually to your chart from the “Add Study” window as we just did and then either turn off the custom plotting of your time series or reduce the number of bars that your strategy is plotting as just described.
The great thing about replacing your custom plotted time series with manually added TradeStation® indicators from TradeStation®’s “Add Study” window whenever possible is that the TradeStation® platform’s plotting of manually added TradeStation® indicators doesn’t slow down the charts like custom plotting of a time series from a strategy does. Another benefit of adding an indicator to the chart from within the TradeStation® user interface to replace or augment the plot drawn by the Quagensia plotting code is that plots drawn by the Quagensia plotting code can only plot through the last bar if “Intra-Bar Order Generation” is set to “true” for your strategy, either from the Quagensia user interface or from the TradeStation® user interface, whereas indicators added to the chart from within the TradeStation® user interface are able to plot through the last bar on the chart regardless of whether Intra-Bar Order Generation is set to “true” or “false”.
It still makes sense to plot the last 100 bars or so of your time series separately from the indicator plot, however, because this helps you verify that the values of the time series your strategy’s logic are actually using match those of the indicators you intended to use in your strategy’s logic. This should always be the case if you selected the indicator that you intended to from within Quagensia, but this extra check allows you to ensure that you didn’t accidentally select the wrong indicator from within Quagensia.