Hello,
i have a bar chart like this:
now i want a MACD view like this:
How can i use the MACD function? I cannot find an example in the tutorials?
Thanks for ur help!
Michael
How to use the MACD function?
Re: How to use the MACD function?
Hi Michael,
There is an example of the MACD function in the features demo program at "All Features\Welcome!\Functions\Financial\MACD".
Here it is the main code:
There is an example of the MACD function in the features demo program at "All Features\Welcome!\Functions\Financial\MACD".
Here it is the main code:
Code: Select all
protected void initChart() {
super.initChart();
chart1.getHeader().setVisible(true);
chart1.setText("MACD Function Example");
chart1.getAspect().setView3D(false);
candleSeries = new com.steema.teechart.styles.Candle(chart1.getChart());
candleSeries.getMarks().setVisible(false);
candleSeries.getPointer().setVisible(true);
candleSeries.setTitle("Candle");
candleSeries.getVertAxis().setStartPosition(0);
candleSeries.getVertAxis().setEndPosition(40);
candleSeries.getVertAxis().getTitle().setCaption("Candle");
candleSeries.fillSampleValues(50);
function = new com.steema.teechart.functions.MACD(chart1.getChart());
Axis tmpAxis;
tmpAxis = chart1.getAxes().getCustom().getNew();
tmpAxis.setHorizontal(false);
tmpAxis.setOtherSide(false);
tmpAxis.setStartPosition(60.0);
tmpAxis.setEndPosition(100);
tmpAxis.getTitle().setText("MACD");
tmpAxis.getTitle().setAngle(90);
Line functionSeries = new com.steema.teechart.styles.Line(chart1.getChart());
functionSeries.setTitle("MACD");
functionSeries.setColor(Color.GREEN);
functionSeries.setCustomVertAxis(tmpAxis);
functionSeries.setDataSource(candleSeries);
functionSeries.setFunction(function);
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: How to use the MACD function?
Where can i find this?
All Features\Welcome!\Functions\Financial\MACD
its not in the TeeChartJavaAndroid_3.2012.0202.zip
Michael
All Features\Welcome!\Functions\Financial\MACD
its not in the TeeChartJavaAndroid_3.2012.0202.zip
Michael
Re: How to use the MACD function?
Hi Michael,
You can find this and other examples in the SWT/Swing features demo program included with the evaluation (with complete Java version at the moment, not just the TeeChart Java for Android version).
You can find this and other examples in the SWT/Swing features demo program included with the evaluation (with complete Java version at the moment, not just the TeeChart Java for Android version).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |