Perl Integration w/ MQL4?

 

Hi,

I'm a newb to MQL4, but know Perl fairly well. I wanted to look at creating a learning algorithm. I can do this pretty easily w/ perl & mysql, but not MQL4 yet. Is there a way to feed data from MQL4 to perl and then to MySQL, or does all coding have to be done only in MQL4?

Thanks,

Newb

 

well... MQL4 can access any .dll you care to think of. The functionality is shown in the #import preprocessor directive eg, in MetaEditor docs you can see:


MQL4 Reference - Basics - Variables - External functions definition

The type of external functions defined in another component of a program must be explicitly described. The absence of such a definition may result in errors during the compilation, linkage, or execution of the program. While describing an external object, the keyword of #import must be used with the reference to the module.

#import "user32.dll"
int MessageBoxA(int hWnd ,string szText,string szCaption,int nType);
int SendMessageA(int hWnd,int Msg,int wParam,int lParam);
#import "lib.ex4"
double round(double value);
#import

Import can be used to easily describe functions called from external DLLs or compiled EX4 libraries.

Pointers to variables can be passed to imported dll functions. Data of the string type are passed as a pointer to the corresponding memory block (one should keep in mind that internal representation of string data consists of two parts: the memory block length and the memory block pointer). If there is a need to pass data of the int or double type, then the one-dimensional array of the corresponding type should be passed by reference as a parameter.

Example:

#import "some_lib.dll"
void PassIntegerByref(int& OneInt[]);
#import
int start()
{
int array[1];
//...
PassIntegerByref(array);
Print(array[0]);
//...
}

.

additionally, you can search this site and pull up many and varied jobs people have cooked up.

also DLL Help Database - windows .dll and How to use MQL4 to retrive data outside of the platform?

and for me, i'd sure like to get into this when time permits ESENT (Extensible Storage Engine) API in the Windows SD

oh yes... not forgetting MT's DDE data stream. I have seen in past, an expert advisor that used DDE to export realTime data feed to AmiBroker which I used for awhile. A bit of sniffing around should help with the DDE side and the AmiBroker stuff must also be kicking about too ;)

.

btw, ever thought of the TCL/TK partnership?

I'm getting stuck into TCL and wow is one heck of a consistent and easy environment....!

Reason: