I'm trying to take a screenshot of the 680th bar (see below).
When I run the code below on the chart the screenshot does not navigate to the -680th position. It takes a screenshot of the chart as it is when you open the chart.
If I step through the code (leaving a break point on the ChartScreenshot line) it does move the chart back to the -680th position... however the screenshot reflects it from Bar.
ChartSetInteger(0, CHART_AUTOSCROLL, 0, false);ChartSetInteger(0, CHART_SCALE, 0, 3);ChartNavigate(0, CHART_END, -680);ChartRedraw();
bool result = ChartScreenShot(0, "MyFile_right.jpg", 400, 400, ALIGN_RIGHT);
Any ideas what I need to add or amend?