|
How to add Horizontal Line and Vertical Line on FinanceChart |
| Posted by Jian Li on May-19-2025 09:57 |
|
Hello Peter
Thanks for your help with my installation of ChartDirector PHP version. Now I have another question. Is it possible to add Horizontal Line and Vertical Line on a FinanceChart? If yes, could you gave me a example how to do it.
Thanks!
JIan Li |
Re: How to add Horizontal Line and Vertical Line on FinanceChart |
| Posted by Jian Li on May-30-2025 22:08 |
|
Thank Peter! Highly appreciate your help for every question I had!
The Best Regard!
Jian Li
|
Copy data from the Chart of Finance Chart Track Line |
| Posted by Jian Li on Sep-22-2025 20:47 |
|
Hi Peter
Highly appreciate you answered two of my questions. Now I have another question during using the chart.
In the Chart of Finance Chart Track Line, if moving mouse cursor, a lot of indicators changes, such as SMA(20), SMA(10), Bollinger. Is there any way I can copy and download the data of all indicators of all days displayed within the chart?
Thanks!
Jian |
Re: Copy data from the Chart of Finance Chart Track Line |
| Posted by Peter Kwan on Sep-23-2025 01:46 |
|
Hi Jian,
The ChartDirector documentation explains how to indicator values are obtained when the mouse cursor moves. You can certainly modify the code to get all indicator values.
https://www.advsofteng.com/doc/cdphp.htm#trackfinanceweb.htm
(A) Starting from the mouse coordinate, it obtains the x coordinate of the nearest trading session on the chart.
(B) The code then iterates all indicators to obtain their values at the x coordinate.
(C) The code generate a text string from the indicator values and display it on the chart.
(i) For your case, instead of using the mouse event handler, you can use a loop to generate the "mouse coordinates" pixel by pixel across the plot area. In this way, you can obtain the indicator values at all the trading sessions. (Note that multiple mouse positions can map to the same trading session. Your code have to check to avoid duplication.)
(ii) Instead of creating a text string for display, you can store the values in arrays. You can then write code to download them or do some other things with them.
Best Regards
Peter Kwan |
|