shared memory.dll

shared memory.dll
Download ALL MT4 scripts (422)
YouTube Video Thumbnail



Similar MetaTrader Tools

shared memory.dll

Info

The shared memory.dll is a Script for MetaTrader 4 that skype chat for product support:latest versions of libraries, scripts, and applications:ftp://zhunko_guest:abd4vsuc@ftp. zhunko.

Usage

This tool is typically used for enhancing chart analysis and decision making.

Platform

This Script works exclusively on MetaTrader 4 (both build 600+ and newer versions).

Setup

Place the downloaded file in MQL4/Scripts folder via File ? Open Data Folder in MetaTrader 4.


How to Install and Use shared memory.dll

1. Installation: Move your script file into the MQL/Scripts directory and restart the platform.

2. Execution: Drag the script onto a chart; it will perform a one-time action, such as closing all open orders or clearing chart objects.

3. Editing: Use MetaEditor (F4) to modify code, click "Compile," and verify no errors appear in the terminal before running.

4. Removing: Scripts stop automatically, but you can remove them manually by right-clicking the chart and choosing "Remove Script."

Frequently Asked Questions

Q: How are scripts different from EAs? A: Scripts execute a single action and then stop; EAs monitor the market and trade continuously.

Q: Can I assign a hotkey to a script? A: Yes, right-click the script in the Navigator, select "Set Hotkey," and define your preferred keyboard shortcut.

Q: Why did my script stop? A: Scripts are designed to stop immediately after finishing their programmed command; this is normal behavior.

What this tool does

skype chat for product support:latest versions of libraries, scripts, and applications:ftp://zhunko_guest:abd4vsuc@ftp.

Typical Use Case

This Script excels in automated trading and technical analysis on MetaTrader 4.

Compatible Platform & Setup

This Script works on MetaTrader 4. Place the file in the MQL4/Scripts folder and restart the terminal.

Description & Settings

Related: Mod Stop Reverse EA with Trailing Orders and Break-Even Levels - another powerful script for MetaTrader 4 traders.

skype chat for product support:

Also recommended: trade journal csv export script for mt4 - similar script with strong performance on MetaTrader 4.


latest versions of libraries, scripts, and applications:

ftp://zhunko_guest:[email protected]

this library is an advanced development of file mapping for mt4. it is significantly more sophisticated than the previous implementation in filemappingmt4.dll. i have been using it in all my programs since the beginning of 2026.

the library's concept is based on accessing file mapping by its name or index. each file mapping has its own class instance, which works with its own descriptors and addresses. every file mapping has a unique name and index. the library employs a three-level synchronization mechanism, ensuring maximum performance.

for a more detailed description, refer to the header file sharedmemory.mqh. examples of library function usage can be found in the test script check_sharedmemory.dll.mq4.

the library is now fully intelligent and understands user intentions.

1.
similar to regular variables, there is no need to create or allocate anything to read or write. it's just one function call.

2.
automatically determines when to project and when not to, eliminating the need for user consideration.

3.
memory allocation is automatic, requiring no user intervention.

4.
three base namespaces are implemented: window, terminal, and global.

5.
each namespace allows the creation of sub-namespaces.

6.
three-level synchronization ensures maximum access speed.

7.
each object has its own class.

8.
the library interface is similar to mql, and almost identical to filemappingmt4.dll, but with half the functions due to its intelligence. see point 2.

9.
convenient string handling. functions return strings instead of filling buffers.

10.
the library works with user files, allowing the projection of existing files.

11.
manual operation without intelligence is possible for even higher speed.

12.
memory allocation size can be adjusted, both for increase and decrease.

a total of 146 functions are divided into 7 groups:

1.
library initialization functions.

2.
general functions.

3.
functions for accessing the representation of the projected file in the address space of the calling process.

4.
functions for writing numbers and strings to memory.

5.
functions for reading numbers and strings from memory.

6.
functions for writing arrays to memory.

7.
functions for reading arrays from memory.


package includes:

1.
header file: sharedmemory.mqh.

2.
test script with examples: check_sharedmemory.dll.mq4.

3.
c++ folder with files sharedmemory.h and sharedmemory.lib for library integration into c++ projects.

4.
all the above, organized into mt4 and mt5 (x32/x64) folders, in the archive sharedmemory.zip.


tips:

function usage examples are provided in the test script check_sharedmemory.dll.mq4.

if you have any questions about usage, please ask.

suggestions for library improvements are welcome.

a short video demonstrates the library's functionality using the test script.

updates:

22.11.2026. version 2.11.22.3.

1.
the library has been compiled as a unicode project to accommodate non-english speakers.

2.
the example script has been updated with many outdated examples removed.

05.12.2026. version 2.12.5.1.

1.
fixed a bug in unicode projects where writing strings with zero length caused an error message.

16.07.2026. version 3.7.16.1.

1.
function names have been changed: memorywriteboolarray() to memorywriteinttoboolarray(), memorywritechararray() to memorywriteinttochararray(), memorywriteunschararray() to memorywriteinttounschararray(), memorywriteshortarray() to memorywriteinttoshortarray(), memorywriteunsshortarray() to memorywriteinttounsshortarray(), and memorywritefloatarray() to memorywritedoubletofloatarray() for mql4.

2.
function names have been changed: memoryreadboolarray() to memoryreadbooltointarray(), memoryreadchararray() to memoryreadchartointarray(), memoryreadunschararray() to memoryreadunschartointarray(), memoryreadshortarray() to memoryreadshorttointarray(), memoryreadunsshortarray() to memoryreadunsshorttointarray(), and memoryreadfloatarray() to memoryreadfloattodoublearray() for mql4.

3.
the library has been adapted for use in mql5.

4.
all library functions are implemented in three variants: current encoding, ansi, and unicode. for mt4, only functions with the 'a' postfix (ansi) are available. for mt5, only functions with the 'w' postfix (unicode) are available.

5.
for mql5, functions for writing arrays have been added: memorywriteboolarray(), memorywritechararray(), memorywriteunschararray(), memorywriteshortarray(), memorywriteunsshortarray(), memorywriteunsintarray(), memorywritelongarray(), memorywriteunslongarray(), and memorywritefloatarray().

6.
for mql5, functions for reading arrays have been added: memoryreadboolarray(), memoryreadchararray(), memoryreadunschararray(), memoryreadshortarray(), memoryreadunsshortarray(), memoryreadunsintarray(), memoryreadlongarray(), memoryreadunslongarray(), and memoryreadfloatarray().

7.
fixed a memory allocation bug that occurred during sequential write and read operations.

07.02.2026. version 4.2.7.0.

1.
sections with type conversion functions have been removed, resulting in a unified header file for mql4 and mql5.

2.
function names working with unsigned data types have been modified, replacing the 'uns' prefix with 'u'.

You may also like: vr-steals-2 - excellent alternative for script users on MetaTrader 4.

Source Code

#property copyright "robotfx"
#property link "https://robotfx.org"
#property script_show_inputs
#property strict
#include <sharedmemory.mqh> //    "sharedmemory.dll".
input int    area            = 0;                       //  : memory_global   0    .
input string initprefix      = "";                      //       . ..  
input int    userglobal      =  25;                     //         .
input int    userterminal    =  50;                     //         .
input int    userwindow      = 100;                     //         .

.......

Leave your opinion, ask a question, share some knowledge

Limitations & Risk Warning

  • This tool is provided for educational and testing purposes only.
  • Past performance does not guarantee future results.
  • Trading involves substantial risk of loss. Use on a demo account first.
  • Results may vary depending on market conditions, broker, and settings.
  • We recommend thorough backtesting and forward testing before using with real funds.
© ROBOTFX Free educational tools by RobotFX. Use entirely at your own risk; we are not liable for any financial losses incurred.