|
How to addmark on finacechart ? |
Posted by ddd on Aug-10-2011 13:00 |
|
I want x-axis lineMark as this picture.
y-axis mark is working, but x-axis isn't.
y-axis mark code:
------------------------------------
Dim xy As XYChart
Dim line_mark As Mark
Set xy = c.addMainChart(300)
Set line_mark = xy.yAxis().addMark(day_open, &HFF00, day_open)
Call line_mark.setLineWidth(3): Call layer_mark.setDrawOnTop(False)
------------------------------------
How to addmark x-axis on finacechart?
I tried, but not working.
help me, please.
|
Re: How to addmark on finacechart ? |
Posted by Peter Kwan on Aug-10-2011 15:30 |
|
Hi ddd,
Financial charts use trading sessions as the x-coordinate, not actually dates.
The date are "names" on the x-axis are for human reading only. They are arbitrary and unpredictable. (The trading days depend on the country, stock exchange location, other national laws, unexpected events, etc.... and is generally unpredictable.) All common technical indicators (such as moving averages, RSI, MACD, etc) are defined based on trading sessions, not dates. That's why the x-axis needs to be in trading sessions.
In the chart, the first visible position is x = 0, the second visible position is x = 1, etc.. For example, if you want to put a mark at the 20th visible trading day on the chart, the code is:
Call xy.xAxis().addMark(20, &HFF00, myTimeStamps(20 + extraPoints))
(Note: extraPoints are the extraPoints that you use in the FinanceChart.setData call.)
See also:
http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&thread=1163612050#N1163632302
Hope this can help.
Regards
Peter Kwan |
Thank you!!! |
Posted by ddd on Aug-11-2011 11:50 |
|
I solved this problem.
It works.
Thank you very much!!!!!!!!
x-axis is just an sampled index in finance chart.
I know now. Thank you,Thank you!! |
|