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

Message ListMessage List     Post MessagePost Message

  Built-in Cursor to measure “Distance”?
Posted by Chuck on Feb-05-2020 06:01

Hi Peter,

Is there a built-in function (similar to the Cursor) that measures distance? For instance, on an OHLC chart, click-hold a location on the chart, drag to second point... the result would be the number of Bars and the Difference Value.

Typically, this would be used to determine time and amount of a move.

Thank you,
Chuck

  Re: Built-in Cursor to measure “Distance”?
Posted by Peter Kwan on Feb-05-2020 15:59
Hi Chuck,

There are APIs XYChart.getXValue and XYChart.getYValue that tells you the x and y data values at a mouse position. For the two points, you can use these APIs to obtain the x and y data values at those points. The difference is the number of bars and the change in the y value. See:

https://www.advsofteng.com/doc/cdnet.htm#XYChart.getXValue.htm
https://www.advsofteng.com/doc/cdnet.htm#XYChart.getYValue.htm

Hope this can help.

Regards
Peter Kwan

  Re: Built-in Cursor to measure “Distance”?
Posted by Chuck on Feb-05-2020 20:36
Thank you Peter
Chuck