Hi nyoman,
A FinanceChart is a container for many charts - the main price chart, and zero or more indicator charts. You can add a polynomial regression line to any of these charts using code similar to the "Parametric Curve Fitting" sample code.
For example in C#, assumg "c" is a FinanceChart object, the code is like:
FinanceChart c = new FinanceChart(.....);
.....
// Add a main price chart to the FinanceChart
XYChart mainChart = c.addMainChart(....);
// Add a polynomial regression line of degree 2 for the closeData to the main price chart
TrendLayer trend0 = mainChart.addTrendLayer2(null, closeData, 0xff0000);
trend0.setLineWidth(3);
trend0.setRegressionType(Chart.PolynomialRegression(2));
trend0.setHTMLImageMap("{disable}");
.....
Hope this can help.
Regards
Peter Kwan |