Script calling library for MT4 build 600 and higher - Libraries for MetaTrader 4 - MetaTrader 4 Resources
This is the script call library for MT4 build 600 and higher.
This library is used to call scripts from your indicators and Expert Advisors.
In earlier versions of MT4, this could be achieved in the following way.
Around build 509, the message parameters may have changed.
wParam is 0x11, lParam is the serial number of the Navigator tree view, starting from 0 (the top script is 0).
The library includes DLL and MQL class libraries.
The source is hosted on GitHub ( CodeBase version may be out of date. Check here for new versions ).
If you have trouble:
I welcome bug reports as GitHub issues .
Add the following include line to your indicator or Expert Advisor
#include <script caller. class.mqh >
Add the following code to initialize/uninitialize class instances.
Script Caller *g_scriptCaller = void ; integer initialize () { g_scriptCaller = new script caller(); Return initialization successful ; } Blank solution initialization ( constant integer reason) { if (g_scriptCaller){ Delete g_scriptCaller; } }
Finally, put in the following code to call the script!
g_scriptCaller.callScript( "script name" ); // Do not end with .mq4