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

Message ListMessage List     Post MessagePost Message

  Problem displaying Parabolic SAR
Posted by Joe on Dec-21-2010 07:45
Attachments:
Hi all,

I'm doing a financial chart and while doing QA testing, I've found the parabolic SAR line does not look correct. Normally it is a series of dots that is displayed either over or under the price line.

The Chart Director demo page seems to display this correctly - but in my page, the chart comes out with a single line.  The candles are showing correctly so I assume my data is in the correct order.   My line to add the chart is

If Request("ParabolicSAR") = "1" Then
  Call c.addParabolicSAR(0.02, 0.02, 0.2, cd.DiamondShape, 5, &H008800, &H000000)
End If


any ideas why the line would display like this? or an idea for checking this further?

thanks!

Joe
12-20-2010 3-35-23 PM.png

  Re: Problem displaying Parabolic SAR
Posted by Peter Kwan on Dec-21-2010 19:36
Hi Joe,

I suspect it is due to using invalid data. In particular, may be the data values are not numbers (but are text strings).

The FinanceChart requires the high/low/open/close/vol data to be numbers. If you are using VB/VBScript, then they need to be numbers according to VB/VBScript syntax.

For example, 1, 2, 3 are numbers, while "1", "2", "3" are not numbers (they are text strings as according to VB/VBScript syntax).

Would you mind to check whether you are using numbers or text strings as data? If you are using text strings, please convert them to numbers before passing them to ChartDirector.

If you need further help, would you mind to inform me the code you use to obtain the data and create the data arrays?

Regards
Peter Kwan

  Re: Problem displaying Parabolic SAR
Posted by Joe on Dec-22-2010 01:39
Hi Peter - that was it exactly.  In vbscript I changed

openData(i) = aryData(1,i)

to

openData(i) = cSng(aryData(1,i))

and the parabolic SAR is showing correctly now.

thanks very much!

Joe