|
Zoomable Chart |
Posted by Mahbub on Sep-27-2011 23:11 |
|
Hi Peter,
I'm trying to use your example : Zooming and Scrolling Demonstration (Windows) in your documentation. Here,
1. Why did you use 'Second' data and 86400 in Calculation, whereas you have selected Zoom unit in days? Whenever I try to omit 'Second' calculation, I end up with mess. How can I modify your source? I've tried to replace .AddSeconds with .AddDays, .TotalSecons with .TotalDays, but failed.
2. Will this zoom and scroll example work in Finance Chart with Indicators (like RSI, MACD)? I have kept Y scale auto scaled.
Thanks. Pls help me. |
Re: Zoomable Chart |
Posted by Peter Kwan on Sep-28-2011 02:56 |
|
Hi Mahbub,
1. We use second as the unit as it is the most common unit used in computer programming. (Although .NET supports other units, many programming languages only supports the second unit. So I think people are familiar with seconds.)
In the sample code, the member variables "dateRange", "currentDuration" and "minDuration" are in seconds. There can be other local variables representing seconds too. You can change all of them to using day as unit and change your computation to use days if you like.
2. The chart in the first "zoom and scroll example" is a line chart, while in the second example it is a scatter chart. You would need to modify the code to display a FinanceChart with Indicators (like RSI, MACD). If you modify it correctly, then of course it would work.
Note that financial charts do not use days as x-coordinate. It uses trading sessions. (The dates are just names for human reading. They are not used or needed in any indicator computations.) There is some examples in this forum which show a FinanceChart with zooming/scrolling, but I think the examples are not written for the .NET framework. There is a Java SWING example in the following link. You may adapt it to your .NET code.
http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&thread=1176387267#N1287084794
Hope this can help.
Regards
Peter Kwan |
|