MQLEXPERT

Oct 1, 2012 at 10:57 AM

Hi,

I have a function like that in C# : 

public static void Test(MqlExpert script)
{
 int ticket = script.OrderSend(SYMBOLS.EURUSD, ORDER_TYPE.OP_BUY, 0.1, script.Ask(), 3, 0, 0);
 MessageBox.Show(ticket.ToString());
}

But i am new on .net and dont know how can i create extension method for MqlExpert. Can you show me an example or send a complete c# working example project?

Thanks..

Coordinator
Oct 1, 2012 at 11:19 AM
Edited Oct 1, 2012 at 11:20 AM

I'm not really sure what you want to complete. Extension method need to make custom MQL function (or those which not implemented yet) be available for .NET ExpertAdvisor. Explanation how to do one described here:

https://tradeplatform.codeplex.com/wikipage?title=Advanced%20development&referringTitle=Documentation

If your goal is to create an ExpertAdvisor in .NET/C# you need to create a class, inherit one from ExpertAdvisor base class and implement 3 method like you do in MQL. Such scenario described here:

https://tradeplatform.codeplex.com/wikipage?title=Development%20Process&referringTitle=Documentation

Sample of ExpertAdvisor implementation can be found here:

https://tradeplatform.codeplex.com/SourceControl/changeset/view/76866#1389978

Hope this helps to clarify situation for you.