


In addition, note the X-axis data are integers from 1-20, not dates or time. You can see in the above image that the bottom row of values displayed in row 302 match the values on the chart. In addition, “Display Equation on chart” and “R-squared value on chart” are checked. To add this Trend line to an Excel chart right-click on the line and select “Add Trend line’ and make the selection, here a 3rd order polynomial trendline is the choice. Ultimately, the Y value (end point) will be displayed in CQG on the chart. Here is an example of applying this trend line to a daily close line chart of data (symbol: EP) in Excel. Where Excel calculates the three coefficients, x is the x-axis values and b is the y intercept. The Third Order Polynomial Trend line has this mathematical formula: In addition to the downloadable sample Excel spreadsheet, a CQG PAC is provided that uses the XLTS study to pull the results into CQG to display on a chart. This article walks you through using Microsoft® Excel’s LINEST function to determine the three coefficients and y-intercept of a 3rd order polynomial function over the past 20 bars of closing price data.
