Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course






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

 
 
Thread Tools
 
Old 08-23-2006, 03:27 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
 
Old 08-23-2006, 03:58 PM
Senior Member
 
Join Date: Mar 2006
Posts: 789
Maji is on a distinguished road
Thanks a lot!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
 
Old 08-23-2006, 07:06 PM
cubesteak's Avatar
Senior Member
 
Join Date: Jul 2006
Location: Southern California
Posts: 160
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
 
Old 08-24-2006, 12:57 AM
deeforex's Avatar
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
 
Old 08-24-2006, 06:44 AM
FX_Sniper's Avatar
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
 
Old 06-23-2007, 03:42 AM
Senior Member
 
Join Date: Feb 2007
Posts: 985
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
 
Old 06-23-2007, 05:10 AM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 297
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
 
Old 06-23-2007, 02:24 PM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
 
Old 07-08-2007, 01:35 PM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
 
Old 03-14-2008, 03:34 AM
Mistigri's Avatar
Member
 
Join Date: Mar 2006
Posts: 34
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

Last edited by Mistigri; 04-18-2009 at 08:46 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
 

Bookmarks

Tags
c# metatrader, dll, dll forex, dll metatrader, dll mt4, ExpertSample.dll, file, FILE EXTENSION EX4, forex, internet, metatrader, metatrader c# DLL, metatrader dll, metatrader socket, metatrader sockets, MistigriFX, mql dll, mt4 dll
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

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

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


All times are GMT. The time now is 03:40 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.