How to pass class object as a paramter from mql5 to C# and from C# to mql5


I got a sample from official website, the sample is pretty good. but every parameter of C# method is simple type, it is not a struct or class.

so some methods have many parameters, it looks not good. i am trying to pass a class object as a parameter to a C# method, but still do not 

know how to do it and need help.

thanks for any tips or sample code.


Hi MTUser2015,

The simple data type can be of type int, float, bool, and char.

Float is the same as a double (a decimal), whereas int is the same as well as bool and char.

Hope that helps.

Note: a parameter is a value that is passed in another function. E.g.

void hi(String name) {



You can see it is a parameter because it is passing the variable "name" into the hi function.

You could have this instead:

void hi() {

 String name = "Bobby";



This does not use any parameters.