Questions on mt5 functionality - page 8

 
revers45:

Can you advise where to read about using .Net libraries in MQL5 programs? I haven't found the appropriate section in the documentation.

Look in the articles.
 
sergeev:
Look in the articles.
I'm not interested in tricks, but in a standard feature, since it has been officially declared.
For example, there are suggestions in the articles to do this through export of unmanageable code https://www.mql5.com/ru/articles/249.
But as far as I understand, integration via decompilation is a hacking technique... I read somewhere on a forum that MQ sued hackers.
So, this method would be just right, as an argument, in such a lawsuit ...)
Как открыть мир C# из MQL5 путем экспорта неуправляемого кода
Как открыть мир C# из MQL5 путем экспорта неуправляемого кода
  • 2011.02.09
  • investeo
  • www.mql5.com
В данной статье я представил различные методы взаимодействия между кодом, написанным на MQL5, и управляемым кодом на C#. Также я подготовил несколько примеров маршалинга структур MQL5 для C# и примеров вызова экспортированных функций DLL в скриптах на MQL5. Приведенные примеры могут служить основой для дальнейших исследований аспектов написания DLL в управляемом коде. Эта статья также открывает двери для использования в MetaTrader 5 множества библиотек, уже реализованных на C#.
 
Write a non-dotnet dll and use it normally in the terminal like other dlls. To support dotnet libraries, we use a transparent wrapper that supports native calls.
 
Renat:
Write a non-dotnet dll and use it normally in the terminal like other dlls. To support dotnet libraries, we use a transparent wrapper that supports native calls.
I tried it, but it didn't work. If I specified the function name with name space and class name, as in C#, the MQL5 compiler doesn't pass it and if I specified just a function name, it is not in the runtime of EX5 in the terminal.
Probably some additional notation is required to explicitly point to .Net attributes, if I could see a simple example...
 
revers45:
I tried it, but it didn't work right away. If I specified a function name with name space and class name, like in C#, the MQL5 compiler doesn't pass it, and if I specified just a function name, it is not in the runtime of EX5 in the terminal.
Probably some additional notation is needed to explicitly point to .Net attributes, if I could see a simple example...
https://www.mql5.com/ru/articles/27
МetaTrader 5. Экспорт котировок в .NET приложение, используя WCF сервисы
МetaTrader 5. Экспорт котировок в .NET приложение, используя WCF сервисы
  • 2010.02.16
  • Alexander
  • www.mql5.com
Вам необходимо организовать трансляцию котировок из MetaTrader 5 в собственное приложение? Связка MQL5-DLL позволяет создавать подобные решения. В статье продемонстрирован один из способов трансляции котировок из MetaTrader 5 в приложения, написанные на .NET. Мне было рациональнее, интереснее и проще реализовать экспорт котировок именно с использованием этой платформы. К сожалению, с выходом "пятерки" поддержки .Net также не появилось, поэтому по старинке будем использовать как прослойку win32 dll с поддержкой .NET.
 
This article is about an additional layer for MQL5 programs, in the form of win32 dll QExpertWrapper.dll, which in turn works with .Net, and my question is about using .Net dll directly in MQL5 programs.
 
revers45:
This article is about an additional layer for MQL5 programs, in the form of win32 dll QExpertWrapper.dll, which in turn works with .Net, and my question is about using .Net dll directly in MQL5 programs.
https://c.mql5.com/mql4/forum/2009/03/NETSampleR.zip
 

Thanks, what you suggested is another interpretation with dll intermediary (wrapper), but for MQL4.
I was doing it approximately the same way, but why should I need all those tricks, decrease reliability and put a different wrapper on each library, if it's already in the terminal...
Show me just a little example of how to use it, this transparent staff vrapper...

Renat:
...To support dotnet libraries we use a transparent wrapper which supports native calls.
 
I rewrote my robot from MQL4 to MQL5 with difficulty. In the tester the TakeProfit parameter is not optimised and trades are not closed by it. I have noticed that I have already traded in the trading robot, but I have not found it and it is not working correctly. What is the reason.
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете - Документация по MQL5
 

From time to time some "crap" happens: the optimizer doesn't start, I thought the processor might be too busy or something. Today I rebooted WIN XP, deframented the disk, started the optimizer:

IQ 0 04:19:14 Tester Experts\Smart Neurons Test.ex5 on EURJPY,H1 from 2003.06.01 00:00 to 2013.06.01 00:00
IP 0 04:19:14 PM Tester Optimization started
PG 0 04:19:14 Tester size of initial task pack is 512
PM 0 04:19:14 Core 1 agent process started
CN 0 04:19:15 Core 1 connecting to 127.0.0.1:3000
II 0 04:19:15 Core 1 connected
QP 0 04:19:16 Core 1connection closed

It works the second time, i.e. I pressed "stop" then "start", and it's not the first time.