Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
It's interesting to make external code with DLL. as far as i know it makes reverse engineering more difficult rather than ex4 files..
however, i would like to have chunk of codes that can be use to make http request or even directly connect to remote mysql... if any of you could provide or have information regarding the solution... please let me know...
Hello Patrick.
if i'm not wrong, you work with IBFX couple years ago... are you still with them now ? do you still collect ticks ?
Thanks for tutorial....it's the one i'm waiting for..
Hi Veematics,
Sorry did not see your post till now :P
Yes I used to work with IBFX about two and half years ago, I do some consulting with them every once in a while.
I don't collect ticks anymore, it's too much work and I don't really have a use for it anymore
I put them in metatrader\experts\library
I correctly define the path for the .def file
... but my EA print on the register this error: -65495
What can be the problem?
And, most, how to solve it?
Is it possible that the .def file can be corrupted?
Thanks in advance...
Not sure, that library looks familiar, are you using that to connect to a website? Have you tried using wininet.lib instead?
I don't think the issue here is the def file or your dll would not even load and work properly ... If you can provide more info ( ie some piece of the code you're using in the dll ) then maybe I can try to help.
I see you are big businessman???
This is not the forum where you can sell such shit you have.
What exactly did you modify in DGC OZFX EA
Quote:
Originally Posted by firedoji
Easy!! Just download all the forex e-book and look at the instruction inside. I get over 200++ e-book from there and some EA too... All EA there are edited and modified...
Not sure, that library looks familiar, are you using that to connect to a website? Have you tried using wininet.lib instead?
I don't think the issue here is the def file or your dll would not even load and work properly ... If you can provide more info ( ie some piece of the code you're using in the dll ) then maybe I can try to help.
I want an EA to read a file, that's not located on the local machine but on the Internet.
FileOpen only works when the file is located in the metatrader directory.
I tired it with a c#-dll but get the error message "cannot call function".
I finally got back to looking at this last night. The problem has to do with associating the wrong def file or no def file with the dll.
This is how you fix it in Visual Studio 2008 Express -
1) Go to project, properties - or alt-F7
2) Go to Linker - double click on it and you get a drop down list
3) Select Input
4) Change the Module Definition File to be whatever you named your def file
Make sure it has the path and full name of the file - such as .\MyDef.def
In 2008 Express version, this is not generated automatically like in the professional versions.
This is the main culprit. There may be other linker/compiler issues that may still cause a problem. What you need to do is to load the ExportFunction example project that ships with Metatrader4. This is found in the experts/DllSample folder. Now go and look at its properties page by page, item by item, and everywhere that it says ExportSample, or ExpertSample, (or whatever it uses pertaining to its naming conventions) change your properties to match your own naming conventions. I went through and did this item by item, and then checked if I got the 127 error. I continued to get that error until the correct module definition file was explicity stated as a dependency. I am not saying that there may not be other things besides that, because I changed everything to match the sample, but once the def file was explicit, that fixed it.
Remember that the dll has to be in the lib folder. You have to have an mqh file in the include directory which explicity imports the dll, and lists the function names with parameters, return types, etc. And then in your indicator or expert you must include the header file. That should do it.
CodersGuru and Mistigri both have good examples on how to do this, but the non-professional Express versions do not explicity add the def file as a dependency, and that is the root of the problem all of us using the Express versions have. (At least it doesn't explicity add it when selecting the particular project to make that we who have the problem, selected.)
See attached image. Remember, you probably still want to make sure your compiler and linker values match those of the exportfunction sample that comes with Metatrader.
I placed there my post, but admin moved it into this thread...
Thanks!
Sorry have not had a chance to look at it yet, I have been busy, but I did not forget and I will try to get back to you on that.
Quote:
Originally Posted by Peco07
I want an EA to read a file, that's not located on the local machine but on the Internet.
You have 2 options, write a C# app that will connect to the website, write a data file on your computer and read it from MT4 or write a C++ dll that will connect to the website read the data ....
If you go the C# route, so far it seems way faster than the DLL route ... If you want to write a c++ DLL here is some code to help you get started. MT4 DLL Web Connect | Mistigri
Quote:
Originally Posted by MG_1
The problem has to do with associating the wrong def file or no def file with the dll.
This is how you fix it in Visual Studio 2008 Express -
Thanks for the info! If you don't mind I will reproduce some parts of your posts on my site...