Forex
Google

Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register FAQ Members List Calendar Search Today's Posts 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

Reply
 
LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 02-02-2007, 03:52 PM
Luke_P Luke_P is offline
Junior Member
 
Join Date: Nov 2006
Posts: 26
Luke_P is on a distinguished road
.Net DLL wrapper

If anyone can help create a .Net DLL wrapper for MetaQuotes I would be greatly appreciative.

http://www.metaquotes.net/forum/997/

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-02-2007, 05:53 PM
dwmcqueen dwmcqueen is offline
Member
 
Join Date: Dec 2006
Posts: 69
dwmcqueen is on a distinguished road
One thing - I do not think it is impossible to call .Net functions from unmanaged. You can expose these functions througfh COM and call that through unmanaged.

That is what you need to do. I attempted some work there, but time and money was devoted elsewhere...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-03-2007, 04:12 AM
Luke_P Luke_P is offline
Junior Member
 
Join Date: Nov 2006
Posts: 26
Luke_P is on a distinguished road
Understandable. I'm going to take a look at it and see how far I can get. I may post my progress here if anyone is able to help out.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-05-2007, 02:58 PM
Luke_P Luke_P is offline
Junior Member
 
Join Date: Nov 2006
Posts: 26
Luke_P is on a distinguished road
Today I received a response from MetaQuotes Software Corp about my inquiry.
Their response:
MetaQuotes: "You can create DLL files in any high-level programming language."
Me: "Does this mean .Net DLLs as well?"
MetaQuotes: "Yes, you can. "

I asked for a sample but am not going to wait on it so I will attempt to make a C# DLL by myself. I will post the sample solution if I am successful.
This means a C++ wrapper is not necessary.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-05-2007, 04:28 PM
dwmcqueen dwmcqueen is offline
Member
 
Join Date: Dec 2006
Posts: 69
dwmcqueen is on a distinguished road
I don't think that is accurate....maybe clarify how to created pure Managed Code dlls and how to define the entry points....

Unless MetaTrader now has some Managed Code aspect to it - I can't imagine that working directly as they say....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-05-2007, 04:33 PM
dwmcqueen dwmcqueen is offline
Member
 
Join Date: Dec 2006
Posts: 69
dwmcqueen is on a distinguished road
Many people have tried C# dlls and failed. I'd be interested if you succeed, since that would change my development as well...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-06-2007, 06:16 AM
Luke_P Luke_P is offline
Junior Member
 
Join Date: Nov 2006
Posts: 26
Luke_P is on a distinguished road
Quote:
Originally Posted by dwmcqueen
I don't think that is accurate....maybe clarify how to created pure Managed Code dlls and how to define the entry points....

Unless MetaTrader now has some Managed Code aspect to it - I can't imagine that working directly as they say....
Your right. I just called them and they confirmed it. He said I need to write a wrapper in C++ to access .NET and that it was not their responsibility to provide a sample. He even had the nerve to give me codersguru's email and told me to ask him for help?!? I told him that was pathetic trying to redirect their support to someone else. I mean don't they provide a product and should therefor provide at least some very basic support?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-06-2007, 11:46 PM
dwmcqueen dwmcqueen is offline
Member
 
Join Date: Dec 2006
Posts: 69
dwmcqueen is on a distinguished road
You know I have been meaning to solve this one.

I may have time early next month to take a look, but I could email you what I have.

You also may want to look here -> dll tutorial for Visual Studio 2005
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-06-2007, 11:48 PM
dwmcqueen dwmcqueen is offline
Member
 
Join Date: Dec 2006
Posts: 69
dwmcqueen is on a distinguished road
They should have never told you that it was possible. The straightline from MetaTrader should be "unmanaged dlls only".

That way, they wouldn't need to provide any support to someone who wants to bridge the gap.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-07-2007, 04:03 AM
Luke_P Luke_P is offline
Junior Member
 
Join Date: Nov 2006
Posts: 26
Luke_P is on a distinguished road
It is very frustrating. When I called yesterday I tried to explain to the guy the common logic that .NET is very popular and they would gain more users but he wouldn't listen. Then I asked him if there will be an API for MT4 and he said spammers caused too many problems for brokers in MT3 so there will be none in MT4. To me that said a lot about where they stand as a company. They are paid by brokers and that's who they work for and will support.

I partly believe that it might be possible to make calls to a .NET dll directly if it is compiled as COM exposed. When I tried to do it MT loaded the dll successfully but failed to call the method. I'd like to help with your effort but it seems that maintaining a wrapper might be a good deal of work. I'd be more motivated if it was 100% .NET. But I can only try the same few variances of calling the .NET dll so many times. The obvious things are that the .NET dll would need to be COM compatible, public and have public static methods. But referencing the namespaces might be where the confusion lies. I just wish I could tell for sure whether MetaQuotes is just being lazy or it is really impossible to use .NET. Does anyone know of any other successful DLL calls made through a language other than C++ such as VB 6 or Delphi?

Last edited by Luke_P : 02-07-2007 at 04:08 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-4/5788-net-dll-wrapper.html
Posted By For Type Date
Cubesteak Central » About This thread Refback 07-18-2007 05:41 PM


All times are GMT. The time now is 12:18 AM.