ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Using Additional Indicator in Finance Chart using VB6
Posted by imranctgbd on Nov-25-2010 22:19
I am new to this forum and strugling to develop a trend analysis system. I had downloaded your component for VB/COM Trial and observing whether it suits me. Your component is absolutely nice. But I am stucked on one thing. I want to add additional indicator line on main candlestick chart like vertical or horizontal or custom. I didn't able to create it. Can anyone help me out from it? Thanks in advance.

  Re: Using Additional Indicator in Finance Chart using VB6
Posted by Peter Kwan on Nov-26-2010 00:43
Hi imranctgbd,

If you are using the FinanceChart object, then there should be a line in your code that calls the addMainChart method to create the main price chart, like:

Call myFinanceChart.addMainChart(.....)

Please change it to:

Set myMainPriceChart = myFinanceChart.addMainChart(.....)

Now you can add an indicator to the myMainPriceChart using:

Call myFinanceChart.addLineIndicator2(myMainPriceChart, myCustomDataSeries, &H0000ff, "My Series")

In the above, myCustomDataSeries is an array of numbers that contains your technical indicator. (It should be similar to the closeData data series, except the array contains your technical indicator values instead of the closing price.)

Hope this can help.

Regards
Peter Kwan

  Re: Using Additional Indicator in Finance Chart using VB6
Posted by imranctgbd on Nov-26-2010 20:29
Attachments:
Hi Peter,

Thanks a lot for your quick reply.

Seems to be I am too beginner to understand. I am just modifying your interactive finance chart. What I want is to create a line on mouse click event ... Please see the arrowed line in the attached picture. In your example I didn't understand what is myMainPriceChart? Whether it is the main chartviewer object that is displayed or something other? Sorry for my ignorance but if you please elaborate it a little further.

Thanks in advance.
Images.jpg

  Re: Using Additional Indicator in Finance Chart using VB6
Posted by Peter Kwan on Nov-27-2010 00:27
Hi imranctgbd,

The line in your case is not really related to the chart (just like the mouse cursor is not related to the chart). For these types of lines, you may simple put the line on the chart directly using normal VB methods.

For example, you may put a PictureBox control on your VB Form, and configures the control to be 1 pixel width and 200 pixels high and with a black background. This becomes a vertical line. Initially, you may hide this control. When the user clicks on the chart, you can move the PictureBox control to the clicked position, and show it. This will become show a vertical line on the chart on where the user has clicked.

Hope this can help.

Regards
Peter Kwan