|
HOw to plot his on to Finance Charts? |
Posted by John Best on Apr-14-2015 18:53 |
|
HI Peter,
I had planetary declination data which I want to plot along with the candlestick chart.
By adding layers, I am able to plot it. But the declination value being below 30, plots very small (height wise) lines with some companies data. For example say the candlechart is for a stock/index trading around 25000. Now the declination values are very small compared to the value. This issue can be solved by scaling either the declinations or stock values. BUt not happy with it.
Is there any other way so that I can plot candle chart in one layer and declination in another layer exactly below the candle.?
http://www.advsofteng.com/gallery_finance.html here the second image shows the Stochastics, just above the candle chart... is what I am asking for? Instead of Stochastics I will have declination(s)
Regards
John |
Re: HOw to plot his on to Finance Charts? |
Posted by John Best on Apr-14-2015 19:30 |
|
Hi Peter
I am attaching a sample image. This too is a better solution.
Left side has price and right side has latitude (mine question was for declination)...
|
Re: HOw to plot his on to Finance Charts? |
Posted by Peter Kwan on Apr-15-2015 04:16 |
|
Hi John,
I assume you are using the FinanceChart object to create the candlestick charts (as
opposed to directly using the addCandleStickLayer of the XYChart object). In this case,
you can use FinanceChart.addLineIndcator to create a new indicator chart below the
main price chart, or you can use FinanceChart.addLineIndicator2 to add the indicator
inside the main price chart. In the latter case, you can use Layer.setUseYAxis2 to ask
ChartDirector to use the secondary y-axis for the indicator.
For example, in C#/Java:
XYChart mainChart = c.addMainChart(240);
c.addCandleStick(0x00ff00, 0xff0000);
// add custom series to the main price chart and use the secondary y-axis
c.addLineIndicator2(mainChart, customSeries, 0xff0000, "ABC").setUseYAxis2();
// configure the secondary y-axis to make it look consistent with the primary axis
mainChart.yAxis2().setMargin(26);
mainChart.yAxis2().setColors(Chart.Transparent, Chart.TextColor, Chart.TextColor,
0x888888);
mainChart.yAxis2().setTickLength(-6);
or
// add a new indicator chart under the main price chart
c.addLineIndicator(70, customSeries, 0x00ff00, "ABC");
Hope this can help.
Regards
Peter Kwan |
Re: HOw to plot his on to Finance Charts? |
Posted by John Best on Apr-16-2015 13:19 |
|
Hi Peter
I am using addCandleStickLayer(). So How this can be done ?
I am using VB.Net.
Regards
John |
Re: HOw to plot his on to Finance Charts? |
Posted by Peter Kwan on Apr-16-2015 23:47 |
|
Hi John,
You may simply add another line layer to the chart and configure it to use the secondary y-
axis:
Dim layer As LineLayer = c.addLineLayer(customSeries, &Hff0000, "ABC")
layer.setUseYAxis2()
Hope this can help.
Regards
Peter Kwan |
Re: HOw to plot his on to Finance Charts? |
Posted by John on Apr-18-2015 20:27 |
|
Hi Peter,
Thanks a lot
Regards
John |
|