Hi Paul,
For financial charts, the unit on the x-axis are trading sessions. (For example, 20 days moving average means 20 trading days, not 20 "real" days.) The date labels are for human reading only.
In FinanceChart, the x-coordinate for Nov 7 is the visible trading day count of Nov 7. For example, if Nov 7 is the 10th trading day in the chart, then its x-coordinate is 9 (the first trading day is 0). The Nov 8 must be the 11th trading day with x-coordinate 10. So the mark line should be put at 9.5 (in between x = 9 and x = 10). The code is (in C#/Java):
//add main chart as usual
XYChart mainChart = c.addMainChart(....);
//add a mark line at x = tradingDayCount
main_chart.xAxis().addMark(tradingDayCount, 0x995500, "");
In practice, the tradingDayCount of any date is just the index position of the date in your timeStamps array, minus the "extraDays" (lead dates that are not visible).
Hope this can help.
Regards
Peter Kwan |