|
Custom indicator for financial chart |
Posted by Stock trader on Jul-11-2012 22:54 |
|
How can i add custom time series like a custom indicator to financial chart in php? |
Re: Custom indicator for financial chart |
Posted by Peter Kwan on Jul-12-2012 05:12 |
|
Hi,
You can use FinanceChart.addLineIndicator, FinanceChart.addLineIndicator2, FinanceChart.addBarIndicator or FinanceChart.addBarIndicator2. For example, in PHP:
$myFinanceChart->addLineIndicator(70, $myCustomIndicatorSeries, 0x0000ff, "My Secret Indicator");
Hope this can help.
Regards
Peter Kwan |
Re: Custom indicator for financial chart |
Posted by traderx on Jul-24-2012 15:04 |
|
Point taken. What if my indicator is not a line or a bar? what if I have a custom overlay to
the candlestick price series? Is there a more sophisticated customization model other than
the method you mentioned? Thanks! |
Re: Custom indicator for financial chart |
Posted by Peter Kwan on Jul-25-2012 03:45 |
|
Hi traderx,
Yes. When you add the main price chart, ChartDirector will return the XYChart object that represents the chart. You can then use the methods of the XYChart object to customize the chart. For example, you can use addScatterLayer to add symbols to arbitrary position to the chart, or use addSplineLayer to add spline curves, or use addStepLineLayer to add step lines, or add area layers, vector layers, box-whisker layers, etc., and you may use Axis.addMark to add mark lines and Axis.addZone to add zones .....
Hope this can help.
Regards
Peter Kwan |
|