Download Chart Objects Copy Paste for MetaTrader 5

Chart Objects Copy Paste

Chart Objects Copy Paste

This professional-grade solution for MetaTrader 5 helps traders achieve greater efficiency in their daily workflow. This technical indicator acts as a specialized analysis tool designed to visualize market data. It helps traders identify emerging trends, momentum shifts, and key support or resistance levels by plotting statistical calculations directly onto price charts.

How to Setup and Use Chart Objects Copy Paste

1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.

2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.

3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.

4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.

Frequently Asked Questions

Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."

Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).

Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.

Description & Settings


Have you ever needed to copy and paste some graphical objects between open charts? I think you have. Surprisingly, MetaTrader does not provide "Copy & Paste" feature for objects. The only thing that allows you to achieve more or less similar effect is templates (tpl-files). But the template stores the full chart state, including indicators, settings and a lot of auxiliary stuff, that may be irrelevant and unnecessary for required replication procedure.
That's why I developed this indicator ChartObjectsCopyPaste.mq5. It copies selected objects to the clipboard, from where they can be pasted onto other chart(s). No strings attached.
The indicator is based on another indicator published in - ObjectGroupEdit.mq5.
Please follow the link to find out more about all the underlying classes (ObjectMonitor, MapArray and others) working behind the scenes.
This indicator has no buffers. It should be attached at least to 2 charts: source chart from which you want to copy objects, and target chart where you plan to paste them.
While running on a chart, indicator tracks existing graphical objects and makes notes about which ones are selected.
As usual "Copy & Paste" commands work in pair:

Press Ctrl+Q hotkey to copy all selected objects into Windows clipboard as a text (you can save and view it in any text editor, you can find an example below).

On a target chart press Ctrl+J to paste all objects from the clipboard.
Why Ctrl+Q/Ctrl+J? These are just 2 vacant key combinations voluntarily chosen from very few. This is because MetaTrader intercepts and does not propagate many hotkeys to MQL-programs. Particularly this is so for the standard Ctrl+C/Ctrl+V/Ctrl+Ins/Shift+Ins, which are not working in this context.
As the source code is available, you can change the hotkeys to other combinations.
Since the indicator uses system DLLs to access Windows clipboard, you should allow DLL imports in the Properties dialog, on the Dependencies tab.
Due to the fact that the Codebase does not allow DLL imports, the related to clipboard code is wrapped into conditional preprocessor directive #ifdef DLL_LINK, so please uncomment the line
#define DLL_LINK
before compilation. Otherwise, you'll see how clipboard function stubs will show you alerts in responce to pressing hotkeys, and no actual actions will be performed!
Inputs are:

MakeAllSelectable - flag to make all objects selectable (which is normally false for those objects created programmatically);

LogDetails - flag to output all properties of transferred objects to the log; The indicator does not check if pasted objects match actual target chart, such as symbol, price range, number of subwindows, etc. - you should do it yourself.
Here is an example of clipboard text with 2 objects:
And here are these objects pasted on the chart:

You May Also Like

RobotFX does not own any of the code provided on this platform. All tools are freely available on the internet; we simply index and re-offer them for download. We are not responsible for any financial losses that may occur. Trading responsibilities rely solely on the traders downloading and using the displayed Expert Advisors, indicators, and scripts. These tools are provided for educational purposes only and may require modification or optimization to align with a trader's specific strategy or needs.
© ROBOTFX - Best MetaTrader Expert Advisors & Indicators