Variance and Correlation
Posted: Mon Nov 05, 2007 7:03 am
Hi:
We are trying to display Variance and Correlation as indicators in our charts. Unfortunately, we are not able to display anything. THere are no error messages associated with the data or anything. Nothing gets displayed. So, I was wondering whether we are not doing something properly.
For instance we tried for both Candle and Volume datapoints to display. But, nothing happens. So, could you guys shed some light. Here is the code snippets.
Any information is appreciated. Thanks.
best regards,
We are trying to display Variance and Correlation as indicators in our charts. Unfortunately, we are not able to display anything. THere are no error messages associated with the data or anything. Nothing gets displayed. So, I was wondering whether we are not doing something properly.
For instance we tried for both Candle and Volume datapoints to display. But, nothing happens. So, could you guys shed some light. Here is the code snippets.
Code: Select all
tmpAxis = tChart2.getAxes().getCustom().getNew();
tmpAxis.getAxisPen().setColor(com.steema.teechart.drawing.Color.GREEN_YELLOW);
tmpAxis.setHorizontal(false);
tmpAxis.setOtherSide(true);
tmpAxis.getLabels().setColor(Color.black);
tmpAxis.setStartPosition(start1);
tmpAxis.setEndPosition(end1);
tmpAxis.getTitle().setVisible(true);
tmpAxis.getTitle().setAngle(90);
varFunction = new Variance();
varFunction.setChart(tChart2.getChart());
varFunction.setPeriod(0);
// System.out.println("CCI - " + dsCandle.getCount());
functionSeries = new com.steema.teechart.styles.FastLine(tChart2.getChart());
functionSeries.setFunction(varFunction);
functionSeries.setDataSource(dsCandle);
functionSeries.checkDataSource();
functionSeries.setTitle("Variance" + "(" + functionSeries.getMarkValue(functionSeries.getCount()-1)+")");
functionSeries.getLinePen().setColor(Color.BLUE);
functionSeries.getLinePen().setWidth(1);
functionSeries.getMarks().setVisible(false);
functionSeries.getDrawAllPoints();
functionSeries.setColor(com.steema.teechart.drawing.Color.BLUE);
functionSeries.setCustomVertAxis(tmpAxis);
functionSeries.getXValues().setDateTime(true);
best regards,