Jason, ¿alguna vez averiguaste cómo crear tu C # DLL y llamarlo desde MT4? He estado jugando con él las últimas horas y puedo compartir algo de código si lo desea: Código MT4 Script 'testDLL' a continuación: archivo testUMD.dll agregado a la carpeta de expertosbibliotecas Código insertado #import testUMD.dll int AddInteger (int Value1, int Value2); doble AddDouble (doble Value1, doble Value2); cadena AddDoubleString (doble Value1, doble Value2); string returnString (string Input); #import///--------------------------------------------- --------------------- /| función de inicio del programa de script |/ ----------------------------------------------- ------------------- int start () {//---- Print (AddInteger: AddInteger (250, 750)); doble a = AddDouble (250,750); Imprimir (AddDouble: NormalizeDouble (a, 4)); double d = StrToDouble (AddDoubleString (250, 750)); Imprimir (AddDoubleString: NormalizeDouble (d, 4)); cadena temp = Enviar a DLL; cadena recv = returnString (temp); Imprimir (recv);/---- retorno (0); } Código C # para 'testUMD.dll' a continuación usando la plantilla de DLL no administrada de RGiesecke referenciada en mi publicación anterior en este hilo. Código insertado usando el sistema; utilizando System.Text; utilizando RGiesecke.DllExport; utilizando System.Runtime.InteropServices; utilizando System.Windows.Forms; namespace testUnmanagedDLL {class Test {# 91; DllExport (AddInteger, CallingConvention = CallingConvention.StdCall) # 93; public static int AddInteger (int Value1, int Value2) {MessageBox.Show (Add Integers: Value1.ToString () Value2.ToString ()); retorno (Valor1 Valor2); } # 91; DllExport (AddDouble, CallingConvention = CallingConvention.StdCall) # 93; public static double AddDouble (double Value1, double Value2) {MessageBox.Show (AddDouble: Value1.ToString () Value2.ToString ()); doble Value3 = Value1 Value2; retorno (Value3); } # 91; DllExport (AddDoubleString, CallingConvention = CallingConvention.StdCall) # 93; cadena estática pública AddDoubleString (doble Value1, doble Value2) {MessageBox.Show (AddDoubleString: Value1.ToString () Value2.ToString ()); doble Value3 = Value1 Value2; return (Value3.ToString ()); } # 91; DllExport (returnString, CallingConvention = CallingConvention.StdCall) # 93; cadena pública estática returnString (cadena de entrada) {MessageBox.Show (Received: Input); retorno (ENVIAR a MT4); }}} Resumen del Cursory: Paso entero = éxito, doble paso MT4 a C # = éxito, doble paso desde C # a MT4 = falla, cadena pasando = éxito. No he experimentado con matrices. Código de muestra escrito con VS 10 .NET 4.0. Si alguien sabe cómo hacer dobles para pasar sin conversión a una cadena de C # a MT4 con éxito, ¡por favor suelte una nota en este hilo o PM!