This project is read-only.


Oct 1, 2012 at 11:57 AM


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);

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?


Oct 1, 2012 at 12:19 PM
Edited Oct 1, 2012 at 12:20 PM

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:

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:

Sample of ExpertAdvisor implementation can be found here:

Hope this helps to clarify situation for you.