非常有用的文章!感谢您的详细介绍。
是的,谢谢。
Metaquotes 试图提高性能,摆脱字节码的束缚......但我们仍将所有程序粘贴在其中!)))
向作者提问:是否对纯 MQL5 程序、DLL 和 .NET 怪物的执行时间进行过比较测试?如果能看一看就好了。
是的,谢谢。
Metaquotes 试图提高性能,摆脱字节码的束缚......我们还是会把所有程序都塞进去!)))
向作者提问:是否对纯 MQL5 程序、DLL 和 .NET 怪物的执行时间进行过比较测试?如果能看一看,会很有意思。
, 我 认为 从原则上讲 , , 开放 可能的 资源 是非常 有用的 ,这 篇文章也 非常 有趣。 但 我 不是 一个很 有经验的 程序员 , 因此 我 有一些 问题。
。
在我看来,非托管代码为我提供了不依赖平台进行开发的可能性。但如果有人使用 Metatrader,他就有了一个确定的平台。
一般来说,使用 非托管 代码 和结合使用MQL5 有 什么 好处 ?
您好,
, 我 认为 从原则上讲 , , 开放 可能的 资源 是非常 有用的 ,这 篇文章也 非常 有趣。 但 我 不是 一个很 有经验的 程序员 , 因此 我 有一些 问题。
。
在我看来,非托管代码为我提供了不依赖平台进行开发的可能性。但如果有人使用 Metatrader,他就有了一个确定的平台。
一般来说,使用 非托管 代码 和结合使用MQL5 有 什么 好处 ?
嗨,smartwart、
好处是您可以使用大量已开发的 C# 代码进行交易。您将在我的下一篇文章中读到更多信息。
干杯
Investeo
这是有史以来最棒的事情!我喜欢 C#,我一直在寻找让它工作的任何可能性!今年最好的消息!我想这是我最后一次用 MQL5 编写 EA。我将把所有逻辑放在库中,并使用一个模板 EA.mq5 来编写我的所有 EA(只是它们将与不同的库链接)。
谢谢!
是的,谢谢。
Metaquotes 试图提高性能,摆脱字节码的束缚......我们还是会把所有程序都塞进去!)))
向作者提问:是否对纯 MQL5 程序、DLL 和 .NET 怪物的执行时间进行过比较测试?如果能看一看就好了。
他们摆脱了哪些字节码?他们有 4 个字节码吗?只是编译器太慢,没有优化。
在.NET中没有字节码,启动时一切都编译成本地机器码,并针对特定处理器进行优化。如果第一次编译的时间至关重要,请使用ngen http://msdn.microsoft.com/ru-ru/library/6t9t5wcf.aspx。
还有测试...会很有趣
我个人只使用了上述方法中的两种,其他的我只听说过。我不明白 COM-interop 有什么帮助,但这可能是为了让图片更完整。这篇文章是 5.

- msdn.microsoft.com
他们摆脱了什么样的字节码?他们有 4 版吗?那只是一个没有优化的慢速编译器。
MQL4 有字节码,而 MQL5 是编译成字节码,然后在执行前预编译成本地 x86 或 x64。MQL5 的行为类似于 .NET
MQL5 作为一种语言将得到进一步开发(开发人员要求更多功能和与 C++ 更好的兼容性),其优化器也将得到改进。
在最新版本中,现在可以通过 #resource 将资源(.BMP 和 .WAV)直接包含到 EX5 文件中,从而创建自给自足的应用程序。这为开发和销售 MetaTrader 5 平台的完整应用程序奠定了良好基础。MQL5 Market 测试版即将发布,任何开发人员都可以在此销售自己的应用程序(经过严格审核),所有交易者都可以直接访问该商店。
只有我无法编译 VS C# 非托管导出 模板吗?
我使用了文章中的模板(并不完整,缺少 dll),并用 R. Giesecke 在这里提供的库对其进行了补充。这里的 Giesecke 库http://sites.google.com/site/robertgiesecke/Home/uploads、
从 R.Giesecke 的原始模板,还将这两个模板进行了混合,但没有任何结果。
编译原始模板时,编译器给出如下结果:
------ Построение начато: проект: UnmanagedExportLibrary8, Конфигурация: Debug Any CPU ------ Построение начато 15.03.2011 19:02:04. CoreCompile: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /define:DEBUG;TRACE /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug+ /debug:full /out:obj\Debug\UnmanagedExportLibrary8.dll /target:library DllExport\DllExportAttribute.cs UnmanagedExports.cs Properties\AssemblyInfo.cs CopyFilesToOutputDirectory: Копирование файла из "obj\Debug\UnmanagedExportLibrary8.dll" в "bin\Debug\UnmanagedExportLibrary8.dll". UnmanagedExportLibrary8 -> d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\bin\Debug\UnmanagedExportLibrary8.dll Копирование файла из "obj\Debug\UnmanagedExportLibrary8.pdb" в "bin\Debug\UnmanagedExportLibrary8.pdb". AfterBuild: ILDasm: calling 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ildasm.exe' with /quoteallnames /unicode /nobar /linenum "/out:c:\Temp\tmpF417\UnmanagedExportLibrary8.il" "d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\bin\Debug\UnmanagedExportLibrary8.dll" ILDasm: ildasm 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ildasm.exe' returned gracefully. d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\bin\Debug\UnmanagedExportLibrary8.dll : Export warning EXP0009: Platform is AnyCpu, creating binaries for each CPU platform in a separate subfolder... ILAsm: Found method: UnmanagedExportLibrary8.UnmanagedExports..method private hidebysig static float64 'AddDays'(float64 'dateValue', int32 'days') cil managed ILAsm: Removing RGiesecke.DllExport.DllExportAttribute from UnmanagedExportLibrary8.UnmanagedExports.AddDays ILAsm: Parsing 242 lines of IL took 66 ms. ILAsm: calling 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\ILAsm.exe' with /nologo "/out:d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\bin\Debug\x86\UnmanagedExportLibrary8.dll" "c:\Temp\tmpF417\UnmanagedExportLibrary8.x86.il" /DLL "/resource=c:\Temp\tmpF417\UnmanagedExportLibrary8.res" /debug ILAsm: ILAsm 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\ILAsm.exe' returned gracefully. d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : Assembling 'c:\Temp\tmpF417\UnmanagedExportLibrary8.x86.il' to DLL --> 'd:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\bin\Debug\x86\UnmanagedExportLibrary8.dll' d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : Source file is UNICODE d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : Assembled method RGiesecke.DllExport.DllExportAttribute::.ctor d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : Assembled method RGiesecke.DllExport.DllExportAttribute::.ctor d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : Assembled method RGiesecke.DllExport.DllExportAttribute::.ctor d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : Assembled method RGiesecke.DllExport.DllExportAttribute::get_CallingConvention d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : Assembled method RGiesecke.DllExport.DllExportAttribute::set_CallingConvention d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : Assembled method RGiesecke.DllExport.DllExportAttribute::get_ExportName d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : Assembled method RGiesecke.DllExport.DllExportAttribute::set_ExportName d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : ***** FAILURE ***** d:\Programming\Visual Studio 2010\Projects\UnmanagedExportLibrary8\UnmanagedExportLibrary8\DllExport\RGiesecke.DllExport.targets(8,5): error : в RGiesecke.DllExport.Parsing.IlParser.RunILTool(String installPath, String toolFileName, String requiredPaths, String workingDirectory, String settingsName, String arguments, String toolLoggingCode, String verboseLoggingCode, DllExportNotifier notifier, Int32 timeout) в RGiesecke.DllExport.Parsing.ILAsm.RunCore(CpuPlatform cpu, String fileName, String ressourceParam, String ilSuffix) в RGiesecke.DllExport.Parsing.ILAsm.Run(String outputFile, String ilSuffix, CpuPlatform cpu) в RGiesecke.DllExport.Parsing.ILAsm.ReassembleFile(String outputFile, String ilSuffix, CpuPlatform cpu) в RGiesecke.DllExport.DllExportWeaver.RunILAsm(ILAsm ilAsm) в RGiesecke.DllExport.DllExportWeaver.Run() в RGiesecke.DllExport.MSBuild.DllExportTask.Execute() СБОЙ построения. Затраченное время: 00:00:01.85 ========== Построение: успешно: 0, с ошибками: 1, без изменений: 0, пропущено: 0 ==========
编译其他模板时也是如此。
系统:W7 x64 SP1 Home Prem Lic.
集成开发环境:VS 2010。
Google 没有提供帮助(。
我手动创建了项目 dll,并根据 R. Giesecke 的建议对其进行了补充。Giesecke 的建议进行了补充,但也没有结果。
请提供建议。
- sites.google.com
我有没有编译模板的非托管出口到 VS C #?
从文章中提取了一个模板(它并不完整,不缺少 dll)添加到 R 的库中。Giesecke 从 http://sites.google.com/site/robertgiesecke/Home/uploads 、
R. Giesecke 的原始模板,因为做了两个模板的混合物,它不工作。
当编译原始模板时,编译器会生成以下结果:
编译其他模式时也是如此。
系统:W7 x64 SP1 Home Prem Lic.
IDE: VS 2010。
谷歌没有帮助(.Dll)。
Dll 手动创建了一个项目,并根据 R. Giesecke 的建议对其进行了补充。Giesecke,结果也是不可用。
Help pliz advice.
您好 kPVT、
在 Win7 中是否存在 Windows7 - XP 向后兼容模式?如果 dll 在 32 位模式下工作,这意味着必须重新编译为 64 位模式才能工作。
我将尝试在stackoverflow.com 上询问 RGiesecke 本人。
致以最诚挚的问候、
Investeo
新文章 使用非托管导出将 C# 代码运用到 MQL5已发布:
在本文中,我介绍了在 MQL5 代码和托管 C# 代码之间进行互动的不同方法。我还提供了几个例子来说明如何针对 C# 封送 MQL5 结构以及如何在 MQL5 脚本中调用导出的 DLL 函数。我相信提供的例子能用作以后研究用托管代码编写 DLL 的基础。本文也为 MetaTrader 使用已经在 C# 中实施了的多个库打开了大门。
作者:investeo