Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course
Forex Forum FAQ Members List Calendar Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

 
 
LinkBack Thread Tools
 
Old 08-23-2006, 02:27 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Talking Create your own MetaTrader extension (dll)

Anybody interested in creating his/her own MetaTrader extension (dll) may go to:

Create your own MetaTrader extension (dll) - Part 1
Create your own MetaTrader extension (dll) - Part 2

There'll be another part (or 2) which I'm writing them!

Hope you enjoy them!
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 08-23-2006, 02:58 PM
Maji Maji is offline
Senior Member
 
Join Date: Mar 2006
Posts: 787
Maji is on a distinguished road
Thanks a lot!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 08-23-2006, 06:06 PM
cubesteak's Avatar
cubesteak cubesteak is offline
Senior Member
 
Join Date: Jul 2006
Location: Southern California
Posts: 163
cubesteak is on a distinguished road
Quote:
Originally Posted by codersguru
Anybody interested in creating his/her own MetaTrader extension (dll) may go to:

Create your own MetaTrader extension (dll) - Part 1
Create your own MetaTrader extension (dll) - Part 2

There'll be another part (or 2) which I'm writing them!

Hope you enjoy them!
WOOT WOOT WOOT!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 08-23-2006, 11:57 PM
deeforex's Avatar
deeforex deeforex is offline
Member
 
Join Date: Oct 2005
Posts: 91
deeforex is on a distinguished road
EXCITING!!!!!

Codersguru you are FANTASTIC! THANKS!

dee
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 08-24-2006, 05:44 AM
FX_Sniper's Avatar
FX_Sniper FX_Sniper is offline
Senior Member
 
Join Date: Jan 2006
Location: South Africa
Posts: 201
FX_Sniper is on a distinguished road
Thumbs up

Excellent Resource !!!
__________________
"I do not need a compass to tell me which way the wind is shining."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 06-23-2007, 02:42 AM
FerruFx FerruFx is offline
Senior Member
 
Join Date: Feb 2007
Posts: 527
FerruFx is on a distinguished road
Hello codersguru!

Great courses you write there. Thanks.

I try to create a dll and test it on MT4. I have an error code 127 (cannot call function 'Test' from dll 'ExpertSample.dll' (error 127))

Here is all the process i do:

1. write the .cpp:

Quote:
#define WIN32_LEAN_AND_MEAN
#define MT4_EXPFUNC __declspec(dllexport)
#include <windows.h>

BOOL APIENTRY DllMain(HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved)
{
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}

return(TRUE);
}

MT4_EXPFUNC int __stdcall Test()
{
return(12);
}
2. i write the .def:

Quote:
LIBRARY ExpertSample
EXPORTS Test
3. I compile, no error, and i put the ExpertSample.dll in the \experts\libraries folder

4. i create my mq4 test file:

Quote:
#property indicator_chart_window

#import "ExpertSample.dll"
int Test();
#import

int init() { return(0); }
int deinit() { return(0); }
int start() { Alert( Test() ); return(0); }
5. i compile, no error

6. Attach the indy test on chart, check allow dll and ... error 127.

In VC++ i have problem to compile because of windows.h is not find. Then i use DevC++ or Code::Blocks with no error at compile.

My questions: did i forget something, in coding, in c++ project parameters or something else?

Thanks for your help.

FerruFx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 06-23-2007, 04:10 AM
ralph.ronnquist's Avatar
ralph.ronnquist ralph.ronnquist is offline
Senior Member
 
Join Date: Oct 2006
Posts: 280
ralph.ronnquist is on a distinguished road
I'm far from expert on writing dll's on windows, but I did manage to write one for MT4 by using gcc on cygwin. Apart from the incantations in the code, the compiler needed some arguments in order to avoid using its defaults for dependent dll's. Maybe you have a similar problem?

The gcc arguments I used were: -shared -Wl,--add-stdcall-alias -mno-cygwin

Of course I don't know your compiler, so maybe this is of no help at all.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 06-23-2007, 01:24 PM
Pawel Pawel is offline
Junior Member
 
Join Date: Mar 2007
Posts: 2
Pawel is on a distinguished road
Has anyone tried to write dll for MT4 with C# using VisualStudio2005? I've made an attempt but I keep geting error 127. Perhaps .net is not a good technology to write libraries for MT4?

Thx,
Pawel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 07-08-2007, 12:35 PM
bcforex bcforex is offline
Junior Member
 
Join Date: Jul 2007
Posts: 2
bcforex is on a distinguished road
Where to get the script of ProfitProtector Expert Advisor

Hi codersguru,

I am very new to the MQL4 programming. I have downloaded your pdf manual. And I have found that you have explained the code snipets very well in the manual. I am very interested in learing about the Expert Advisor and surprised to learn that you can do a lot of things with this language for trading. In the manual, youu have mentioned that I can download the ProfitProtector script from your site. So far, I am not able to find the script. Please guide me how to download the sample script.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 03-14-2008, 01:34 AM
Mistigri's Avatar
Mistigri Mistigri is offline
Junior Member
 
Join Date: Mar 2006
Location: SLC
Posts: 22
Mistigri is on a distinguished road
Video - Write a DLL for MT4

Just finished a video on how to write a DLL for MT4 ... I tried to make an example that returns an array since it's really what I though was missing when I first started to look into the sample provided by MetaQuotes.

Watch Video

If you are only interested in the code and VS project, these can be downloaded Here.
Hope you like it

Patrick
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
About Fibo extension phildunn General Discussion 11 03-30-2008 12:31 PM
How do I use the files with .ex4 extension. NEEL123 General Discussion 4 04-06-2007 09:13 AM
there is any script/program to create walk forward test data for metatrader???? giraia_br Metatrader 4 1 03-26-2007 12:44 AM
Please create an EA matrixebiz Expert Advisors - Metatrader 4 0 11-28-2006 07:19 PM


All times are GMT. The time now is 12:49 PM.