The function provides a screenshot of the chart in its current state in the GIF, PNG or BMP format depending on specified extension.
[in] Chart ID. 0 means the current chart.
[in] Screenshot file name. Cannot exceed 63 characters. Screenshot files are placed in the \Files directory.
[in] Screenshot width in pixels.
[in] Screenshot height in pixels.
[in] Output mode of a narrow screenshot. A value of the ENUM_ALIGN_MODE enumeration. ALIGN_RIGHT means align to the right margin (the output from the end). ALIGN_LEFT means Left justify.
Returns true if successful, otherwise false.
If you need to take a screenshot from a chart from a certain position, first it's necessary to position the graph using the ChartNavigate() function. If the horizontal size of the screenshot is smaller than the chart window, either the right part of the chart window, or its left part is output, depending on the align_mode settings.