Create your own MetaTrader extension (dll) - page 10

 

[langtitle=es]Crea tu propia extensi�n de MetaTrader (dll)[/langtitle]

[lang=es]Por favor alguine me podria enviar el material de la creacion de DLL, ya que lo slink estan desactivados!

Mi correo es alex_burgos77@hotmail.com

Saludos y gracias por su amable colaboraci�n.[/lang]

 

...

In the experts/samples/DLLSample sub-folder of your metatrader folder you have a fully working example (project) which you can use to build custom dll code callable from mql code

aldeberik:
[lang=es]Por favor alguine me podria enviar el material de la creacion de DLL, ya que lo slink estan desactivados!

Mi correo es alex_burgos77@hotmail.com

Saludos y gracias por su amable colaboraci�n.[/lang]
 

Don't use DevC++, use Code::Block instead

For those of you who does not like installing Visual Studio (because it's huge size both the visual studio itself and the updates or because you have a hacked OS), I suggest to look at here. Latest stable of DevC++ was 7 years ago. It's web site is full with dead links, looks like no one taking care of them anymore.

My favourites is Code::Block or NetBeans. NetBeans - though supported by Oracle - does not comes with it's own compiler, so configurating compiler for NetBeans is really frustrating for Newbie.

IMHO, try Code::Block instead.

Here's important advice : recently MT4 build 418 has problem with returned values when calling dll. My suggestion is, call some sort of test.dll by both passing parameters or passing values into the dll, just to check it's return values (integer, double, string, array or not, you have the idea) . If the returned values are correct with the one we pass, you can continue calling the main dll. If not, don't call the main dll, pop out some alert to warn user and show the error. This test.dll should be calling only one on init or on start. Just to check.

Have fun

 

...

Even though I use visual studio, I used code::blocks before and I agree with you :for a simpler installation and less space used it is OK.

Btw: you are right about build 418 but build 419 solved that (at least that issues is solved in it) so if you use build 419 you are rather safe

onewithzachy:
For those of you who does not like installing Visual Studio (because it's huge size both the visual studio itself and the updates or because you have a hacked OS), I suggest to look at here. Latest stable of DevC++ was 7 years ago. It's web site is full with dead links, looks like no one taking care of them anymore.

My favourites is Code::Block or NetBeans. NetBeans - though supported by Oracle - does not comes with it's own compiler, so configurating compiler for NetBeans is really frustrating for Newbie.

IMHO, try Code::Block instead.

Here's important advice : recently MT4 build 418 has problem with returned values when calling dll. My suggestion is, call some sort of test.dll by both passing parameters or passing values into the dll, just to check it's return values (integer, double, string, array or not, you have the idea) . If the returned values are correct with the one we pass, you can continue calling the main dll. If not, don't call the main dll, pop out some alert to warn user and show the error. This test.dll should be calling only one on init or on start. Just to check.

Have fun
 
mladen:
Btw: you are right about build 418 but build 419 solved that (at least that issues is solved in it) so if you use build 419 you are rather safe

Code::Block things, not just that, some programmers are still prefer DevC++, and leave comment on sourceforge site telling how good DevC++ is. Apparently, these programmers are not updated yet.

MT 418 things, the biggest Q is, will the next MT4 safe from this kind of bugs again ?. When they update from 416 to 418, naturally we expect some improvement, we didn't expect some error, but we got error instead. Took them a week to fix it, but losses already occur .

That's why some programmers suggest that we should update just one of our MT4 just to check if everything is OK.

Next June 2012, at mql4 forum, they about to update to build 421 and no longer support 416. Hopefully, there will be no bug at all.

 

:)

Judging from the experience so far, the chances for that are rather on the oposite side of your wishes ... Oh well, let's hope (strongly, strongly hope) maybe that helps ...

 

great help for this! it is a useful comment!

 

Metatrader + SSL Connection

Hi,

I want to download a xml-file from https://www.url.com/file.xml.

How can I do this with metatrader? Which dll can I use??

 

A Path for C# Developers: MT4/5 -> C# DLL

I wrote a sample project that may help those who are attempting to write an unmanaged C# DLL, and access it from Metatrader. You can see the source code to Export C# DLL to Metatrader Code Sample including a downloadable VS project. This code uses the C# Project Template for Unmanaged Exports by Robert Giesecke (link below).

pipscooper:
Those C# developers who would like to write a DLL in C# for Metatrader instead of in C++ now have a path to that end. There is a very interesting article titled "Exposing C# code to MQL5 using unmanaged exports" that I've just read.

Read/skim the article and read section 2.5 onward.

Exposing C# code to MQL5 using unmanaged exports - MQL5 Articles

Read the directions, then download the Template for C# "Unmanaged Export Library" and place the zip file in the right directory (by following the directions on that page):

C# Project Template for Unmanaged Exports

Load VS and select the "Unmanaged Export Library" template. Follow the code samples. Hope this helps somebody!
 

Basic question to mql4-programming

Hi,

I want to import some functions from a dll. Therefore I had to include some *.h files.

Is this possible, or do I have to write *.mqh instead of *.h?

The dll if for a c-programming language.

And there are functions with pointers and structs as datatyps. Is it possible to use that with mql4??