Timestamped Chart Screenshot
This is the single-chart companion to a batch tool: for journalling one setup rather than sweeping the whole workspace. Drag it onto the chart you are looking at, optionally type a one-line note, and it saves a captioned PNG without leaving the note behind on the chart afterwards. Two things separate this from a naive Alt+PrintScreen. First, it does not move the chart. A trader who wants a screenshot has usually already scrolled to the setup that matters - forcing the view back to the latest bar before the shot, as a batch capture tool reasonably would, would capture the wrong moment here. Second, ChartScreenShot() does not take the picture synchronously - it queues the request on the chart and returns once the request is accepted, not once the file exists. If the caption were removed straight after that call, on a slow render the label could be deleted before the picture is actually drawn, producing a screenshot with no caption in it. This script waits for the file to actually appear before taking the caption down. Notes and limitations - If the chart is minimised or entirely covered when the script runs, the capture can fail even though ChartScreenShot() accepted the request; the script reports this rather than claiming a save that did not happen. - The caption is a genuine chart object while the shot is in progress - if MetaTrader is closed or crashes in the brief window between drawing it and the file appearing, it can be left behind. It is named tss_comment and safe to delete by hand if that ever happens. - One capture per run. For a whole workspace at once, use a batch tool instead - this one deliberately does one chart, and does not move it.
Script · MT4 · v1.0 · Free
About Timestamped Chart Screenshot
Timestamped Chart Screenshot is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Width, Height and Comment. MQL source code included.
Files in the download: TimestampedScreenshot.ex4, TimestampedScreenshot.mq4, TimestampedScreenshot.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Width | 1366 | Screenshot width, pixels (320-4096) |
| Height | 768 | Screenshot height, pixels (320-4096) |
| Comment | Optional caption, shown top-left then removed after the shot |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Alerts · MT4 Script · MQL4 Source Code