Script Calling Libary for MT4 build 600 and later

0
(0)
Name:
Script Calling Libary for MT4 build 600 and later
Author: micclly (2014.02.27 15:15)
Downloaded: 62
Download:
Script Calling Libary for MT4 build 600 and later 1
 mt4-script-caller-0.1.0.zip (37.7 Kb)

Description:

This is script calling library for MT4 build 600 and later.

This library is for callingl scripts from your indicator and expert advisors.

On earlier build of MT4, this can be achieved with this method.

Around build 509, message parameter may have been changed.

wParam is 0x11, and lParam is the ordinal of Navigator tree view, starts from 0 (the top script is 0).

This library includes DLL and a MQL class library.

Source:

Source is hosted on GitHub (CodeBase version might be outdated).

If you are in trouble:

I'm welcome bug reports on GitHub Issue.

How to use:

  1. Add the following include line to your indicator or expert advisor
    #include <ScriptCaller.class.mqh>
  2. Add the following code to initialize/deinitialize class instance.
    ScriptCaller* g_scriptCaller = NULL;
    
    int OnInit()
    {
       g_scriptCaller = new ScriptCaller();
       return INIT_SUCCEEDED;
    }
    
    void OnDeinit(const int reason)
    {
       if (g_scriptCaller) {
           delete g_scriptCaller;
       }
    }
  3. Finally, put the following code to call script!
    g_scriptCaller.callScript("ScriptName"); // Do not end with .mq4
  4. If the script shows input dialog, and you want to close it automatically, call as follows.
    g_scriptCaller.callScript("ScriptName", true); // if the 2nd parameter is true, dialog will be closed automatically.

 

Samples:

Under MQL4\Indicators, 2 sample indicators, which calls scripts under MQL4\Scripts .

License:

This software is licensed under GNU General Public License Version 3.

Update history:

  • Feburary 27, 2014: v0.1.0: Initial release version

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?



Author: Forex Wiki Team
We are a team of highly experienced Forex Traders [2000-2023] who are dedicated to living life on our own terms. Our primary objective is to attain financial independence and freedom, and we have pursued self-education and gained extensive experience in the Forex market as our means to achieve a self-sustainable lifestyle.